diff options
Diffstat (limited to 'samplecode/SamplePathText.cpp')
| -rw-r--r-- | samplecode/SamplePathText.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SamplePathText.cpp b/samplecode/SamplePathText.cpp index bb2142ef92..023dc6dca1 100644 --- a/samplecode/SamplePathText.cpp +++ b/samplecode/SamplePathText.cpp @@ -354,11 +354,11 @@ void WavyPathText::Waves::reset(SkRandom& rand, int w, int h) { } SkPoint WavyPathText::Waves::apply(float tsec, const Sk2f matrix[3], const SkPoint& pt) const { - constexpr static int kTableSize = 4096; + constexpr static int kTableSize = 1 << 12; static float sin2table[kTableSize]; static SkOnce initTable; initTable([]() { - for (int i = 0; i <= kTableSize; ++i) { + for (int i = 0; i < kTableSize; ++i) { const double sintheta = sin(i * (SK_ScalarPI / kTableSize)); sin2table[i] = static_cast<float>(sintheta * sintheta - 0.5); } |
