diff options
author | 2014-09-15 09:28:54 -0700 | |
---|---|---|
committer | 2014-09-15 09:28:54 -0700 | |
commit | 81940de68893e6a643301f9930db630764729ea8 (patch) | |
tree | ef9d873d68a8c44c0bc72ec969b478900fa549e4 | |
parent | e956259c5a4f71768afb34ec032eaed49dcbe9f2 (diff) |
Add flag to call SkRecordOptimize on new pictures.
As usual it's enabled by default in the Skia tree. Will flip in Chrome after this rolls.
BUG=skia:
R=robertphillips@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/573773002
-rw-r--r-- | gyp/common_conditions.gypi | 1 | ||||
-rw-r--r-- | src/core/SkPicture.cpp | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index 338dbc1f87..7fe49d6daa 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -7,6 +7,7 @@ 'SK_SUPPORT_OPENCL=<(skia_opencl)', 'SK_FORCE_DISTANCEFIELD_FONTS=<(skia_force_distancefield_fonts)', 'SK_PICTURE_USE_SK_RECORD', + 'SK_PICTURE_OPTIMIZE_SK_RECORD', ], 'conditions' : [ ['skia_pic', { diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index 5b9921024e..c99939703c 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -639,9 +639,11 @@ uint32_t SkPicture::uniqueID() const { return fUniqueID; } + static SkRecord* optimized(SkRecord* r) { - // TODO(mtklein): try this after SkRecord has stuck - //SkRecordOptimize(r); +#ifdef SK_PICTURE_OPTIMIZE_SK_RECORD + SkRecordOptimize(r); +#endif return r; } |