diff options
-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; } |