diff options
-rw-r--r-- | src/core/SkCoverageDelta.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/SkCoverageDelta.h b/src/core/SkCoverageDelta.h index 04147e1ac3..4c6b12bae6 100644 --- a/src/core/SkCoverageDelta.h +++ b/src/core/SkCoverageDelta.h @@ -43,13 +43,14 @@ using SkCoverageDeltaAllocator = SkSTArenaAlloc<256>; // Once sorted, getDelta(y, i) should return the i-th leftmost delta on row y. class SkCoverageDeltaList { public: -#ifndef GOOGLE3 - // We can store INIT_ROW_SIZE deltas per row (i.e., per y-scanline) initially - static constexpr int INIT_ROW_SIZE = 32; - static constexpr int RESERVED_HEIGHT = 128; // reserve this many rows on stack memory -#else + // We can store INIT_ROW_SIZE deltas per row (i.e., per y-scanline) initially, + // and we reserve RESERVED_HEIGHT rows on stack memory. +#ifdef GOOGLE3 static constexpr int INIT_ROW_SIZE = 8; // google3 has 16k stack limit - static constexpr int RESERVED_HEIGHT = 120; // reserve this many rows on stack memory + static constexpr int RESERVED_HEIGHT = 120; +#else + static constexpr int INIT_ROW_SIZE = 32; + static constexpr int RESERVED_HEIGHT = 128; #endif SkCoverageDeltaList(SkCoverageDeltaAllocator* alloc, int top, int bottom, bool forceRLE); @@ -122,10 +123,10 @@ public: static constexpr int SIMD_WIDTH = 8; static constexpr int SUITABLE_WIDTH = 32; -#ifndef GOOGLE3 - static constexpr int MAX_MASK_SIZE = 2048; +#ifdef GOOGLE3 + static constexpr int MAX_MASK_SIZE = 1024; // G3 has 16k stack limit based on -fstack-usage #else - static constexpr int MAX_MASK_SIZE = 1024; + static constexpr int MAX_MASK_SIZE = 2048; #endif // Expand PADDING on both sides, and make it a multiple of SIMD_WIDTH |