summaryrefslogtreecommitdiff
path: root/core/SkPicture.cpp
diff options
context:
space:
mode:
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-23 15:16:05 +0000
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-23 15:16:05 +0000
commita6cb8d491252bbfeea3fe1fbd59e3a7e5b63f9a9 (patch)
treeaaf752c235e040ea277635fe29d981644df7373a /core/SkPicture.cpp
parentb2572451cc8a8bfc6671770864285ea58afaffa1 (diff)
downloadsrc-a6cb8d491252bbfeea3fe1fbd59e3a7e5b63f9a9.tar.gz
No deduping dictionaries for matrices and regions.
There's little benefit to deduping matrices and regions: they're infrequently used, and doubly infrequently reused. Their use-weighted byte cost is tiny. There is some downside to deduping matrices and regions. Even when they're not used, we prepare dictionaries for deduping them for every picture. Each of these dictionaries costs 160 bytes, so two unused dictionaries make a big chunk of the ~1100 bytes it takes to allocate an SkPictureRecord. (~330 come from parent class SkCanvas, 768 from SkPictureRecord itself, here reduced to 448). One side benefit of not deduping these guys is that the change weighs -140 lines of code. It may go without saying, but this breaks the picture format. Testing: out/Debug/tests && out/Debug/dm (which runs all picture modes by default) BUG=skia:1850 R=reed@google.com, bensong@google.com, robertphillips@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/143883006 git-svn-id: http://skia.googlecode.com/svn/trunk/src@13149 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'core/SkPicture.cpp')
-rw-r--r--core/SkPicture.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/core/SkPicture.cpp b/core/SkPicture.cpp
index 15eb1375..ca1b6fa2 100644
--- a/core/SkPicture.cpp
+++ b/core/SkPicture.cpp
@@ -283,12 +283,7 @@ bool SkPicture::StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) {
return false;
}
- if (PICTURE_VERSION != info.fVersion
-#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TOO
- // V16 is backwards compatible with V15
- && PRIOR_PICTURE_VERSION != info.fVersion // TODO: remove when .skps regenerated
-#endif
- ) {
+ if (PICTURE_VERSION != info.fVersion) {
return false;
}