aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches
diff options
context:
space:
mode:
authorGravatar benjaminwagner <benjaminwagner@google.com>2016-02-02 16:01:39 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-02 16:01:39 -0800
commit67e8bd207261ed4a4b30c4e488a6a2b6baf04d7a (patch)
tree4914444176e82ce7473f3b0a7caf0fd0c678c1e7 /src/gpu/batches
parent8870e94fe38dc2cd73e0603b5facc4af78b5be83 (diff)
Revert of Move Google3-specific stack limitation logic to template classes. Remove #ifdefs in other files. (patchset #2 id:50001 of https://codereview.chromium.org/1656143003/ )
Reason for revert: See https://codereview.chromium.org/1665603002 Original issue's description: > Move Google3-specific stack limitation logic to template classes. Remove #ifdefs in other files. > > Does not change the public API. > > TBR=reed > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1656143003 > > Committed: https://skia.googlesource.com/skia/+/c92159c8250c62cc47b7b63686538d61d54d2835 TBR=mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1666503002
Diffstat (limited to 'src/gpu/batches')
-rw-r--r--src/gpu/batches/GrDrawPathBatch.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/batches/GrDrawPathBatch.cpp b/src/gpu/batches/GrDrawPathBatch.cpp
index a99f4ebf43..ff62539932 100644
--- a/src/gpu/batches/GrDrawPathBatch.cpp
+++ b/src/gpu/batches/GrDrawPathBatch.cpp
@@ -137,8 +137,14 @@ void GrDrawPathRangeBatch::onDraw(GrBatchFlushState* state) {
instances.count());
} else {
int floatsPerTransform = GrPathRendering::PathTransformSize(this->transformType());
+#if defined(GOOGLE3)
+ //Stack frame size is limited in GOOGLE3.
+ SkAutoSTMalloc<512, float> transformStorage(floatsPerTransform * fTotalPathCount);
+ SkAutoSTMalloc<256, uint16_t> indexStorage(fTotalPathCount);
+#else
SkAutoSTMalloc<4096, float> transformStorage(floatsPerTransform * fTotalPathCount);
SkAutoSTMalloc<2048, uint16_t> indexStorage(fTotalPathCount);
+#endif
int idx = 0;
for (DrawList::Iter iter(fDraws); iter.get(); iter.next()) {
const Draw& draw = *iter.get();