aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-10 02:51:59 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-10 02:52:11 +0000
commit6e1e27b7fccd74d91d9bbc2a22bf55f2725f2a1b (patch)
treebc1f96794e5807b231a29a72b45718386788f3d5 /src/core
parent94cbbba96f1a2a425663e631c09591023f2e48d7 (diff)
Revert "prealloc room for some number of Elements to avoid malloc"
This reverts commit 94cbbba96f1a2a425663e631c09591023f2e48d7. Reason for revert: exceeded stack-size on g3 (in SkPDFDevice.cpp:1552 Original change's description: > prealloc room for some number of Elements to avoid malloc > > I chose 16, as in my test case from android, the depth was > at least 9. Possibly we could make it even smaller if our > underlying impl (SkDeque) would never prune its allocations, > so that we don't malloc repeatedly if we save/restore/save/restore > across the boundary of the first/nth chunk... > > BUG=skia: > > Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d > Reviewed-on: https://skia-review.googlesource.com/9522 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I22c45970b1e3f585087ed22f75c300df00c8124d Reviewed-on: https://skia-review.googlesource.com/9505 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkClipStack.cpp5
-rw-r--r--src/core/SkClipStack.h4
2 files changed, 2 insertions, 7 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index d94bdcbf62..f41945e090 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -495,13 +495,12 @@ void SkClipStack::Element::updateBoundAndGenID(const Element* prior) {
static const int kDefaultElementAllocCnt = 8;
SkClipStack::SkClipStack()
- : fDeque(sizeof(Element), fStorage, sizeof(fStorage), kDefaultElementAllocCnt)
+ : fDeque(sizeof(Element), kDefaultElementAllocCnt)
, fSaveCount(0) {
}
SkClipStack::SkClipStack(const SkClipStack& b)
- : fDeque(sizeof(Element), fStorage, sizeof(fStorage), kDefaultElementAllocCnt)
-{
+ : fDeque(sizeof(Element), kDefaultElementAllocCnt) {
*this = b;
}
diff --git a/src/core/SkClipStack.h b/src/core/SkClipStack.h
index fac739eb2c..080712dfe3 100644
--- a/src/core/SkClipStack.h
+++ b/src/core/SkClipStack.h
@@ -522,10 +522,6 @@ public:
private:
friend class Iter;
- enum {
- kPreallocCount = 16
- };
- intptr_t fStorage[kPreallocCount * sizeof(Element) / sizeof(intptr_t)];
SkDeque fDeque;
int fSaveCount;