aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-07-26 00:21:56 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-26 04:48:09 +0000
commit103611d4c7c64316e5839abdc7bb6153eb1d28e1 (patch)
treec560f60f84ac6630a77e675bb6426b100938ebe8
parentdf60e369a8fb83c5dafded3f2453defa423f174a (diff)
Fix flutter and g3 build
Replace deprecated function call and reduce stack usage in g3 Bug: skia: Change-Id: Ib49ccecef4711c92ea2e62e772d98c0f5097e30d TBR: reed@google.com, caryclark@google.com Reviewed-on: https://skia-review.googlesource.com/26565 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
-rw-r--r--src/core/SkCoverageDelta.h4
-rw-r--r--src/core/SkScan_DAAPath.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkCoverageDelta.h b/src/core/SkCoverageDelta.h
index e0ecb9d7e6..bf0baf234b 100644
--- a/src/core/SkCoverageDelta.h
+++ b/src/core/SkCoverageDelta.h
@@ -44,7 +44,11 @@ using SkCoverageDeltaAllocator = SkSTArenaAlloc<256>;
class SkCoverageDeltaList {
public:
// We can store INIT_ROW_SIZE deltas per row (i.e., per y-scanline) initially
+#ifndef GOOGLE3
static constexpr int INIT_ROW_SIZE = 32;
+#else
+ static constexpr int INIT_ROW_SIZE = 8; // google3 has 16k stack limit
+#endif
static constexpr int RESERVED_HEIGHT = 128; // reserve this many rows on stack memory
SkCoverageDeltaList(SkCoverageDeltaAllocator* alloc, int top, int bottom, bool forceRLE);
diff --git a/src/core/SkScan_DAAPath.cpp b/src/core/SkScan_DAAPath.cpp
index 295d621446..0c199f43f1 100644
--- a/src/core/SkScan_DAAPath.cpp
+++ b/src/core/SkScan_DAAPath.cpp
@@ -321,7 +321,7 @@ void SkScan::DAAFillPath(const SkPath& path, const SkRegion& origClip, SkBlitter
SkRect rect;
if (!isInverse && path.isRect(&rect) && clippedIR.height() >= 3 && clippedIR.width() >= 3) {
// The overhead of even constructing SkCoverageDeltaList/Mask is too big. So just blit.
- bool nonEmpty = rect.intersect(SkRect::MakeFromIRect(clipBounds));
+ bool nonEmpty = rect.intersect(SkRect::Make(clipBounds));
SkASSERT(nonEmpty); // do_fill_path should have already handled the empty case
if (nonEmpty) {
blitter->blitFatAntiRect(rect);