aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-07-26 11:35:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-26 16:14:49 +0000
commite82a10bb183b5f7753aa67657c4e3a9375f297d2 (patch)
tree5f1008cd6be35be648e614c79f30ee01faf05e39
parentb4bd5ef99c99745959a9f1eb208d558da163d8d8 (diff)
Use ifdef instead of ifndef
Bug: skia: Change-Id: I9f86f71247379713ffaf14e5c704c2ac4c6f9cbd Reviewed-on: https://skia-review.googlesource.com/26861 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
-rw-r--r--src/core/SkCoverageDelta.h19
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