aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureStateTree.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-10 23:06:54 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-10 23:06:54 +0000
commit773f8e24214991332eaf903e72c13dca7d78d40d (patch)
treee56af22de79ed9f7d8007065e68d6b97e199d00a /src/core/SkPictureStateTree.h
parent9a65e2c22dc3f0d4823520ab3d561f57ff09198c (diff)
Avoid heap allocation in SkPictureStateTree constructor
This makes empty state trees cheaper. ~1% improvement on rasterize_and_record_micro.key_silk_cases on Android. BUG=1772 R=tomhudson@chromium.org, tomhudson@google.com Author: skyostil@chromium.org Review URL: https://codereview.chromium.org/111573002 git-svn-id: http://skia.googlecode.com/svn/trunk@12616 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPictureStateTree.h')
-rw-r--r--src/core/SkPictureStateTree.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkPictureStateTree.h b/src/core/SkPictureStateTree.h
index 9d8bcf868a..87529586d3 100644
--- a/src/core/SkPictureStateTree.h
+++ b/src/core/SkPictureStateTree.h
@@ -115,7 +115,6 @@ private:
void appendNode(uint32_t offset);
SkChunkAlloc fAlloc;
- Node* fRoot;
// Needed by saveCollapsed() because nodes do not currently store
// references to their children. If they did, we could just retrieve the
// last added child.
@@ -140,6 +139,9 @@ private:
};
};
+ Node fRoot;
+ SkMatrix fRootMatrix;
+
typedef SkRefCnt INHERITED;
};