diff options
author | 2014-04-16 16:02:10 +0000 | |
---|---|---|
committer | 2014-04-16 16:02:10 +0000 | |
commit | d393b17cf3427bd6f6255f8670067d9aa529e409 (patch) | |
tree | 3c534a8644f344121e6e56b3322ea7ebcf62d51c /samplecode | |
parent | 4453e8b45aaaaea568da35f8144177bdc8d2e171 (diff) |
Retract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API
This CL sets the stage for retracting the SkPicture::kOptimizeForClippedPlayback_RecordingFlag flag
from the public API (more work needs to be done in Blink & Chrome). In the new world the only way
to set this flag (and thus instantiate an SkPicture-derived
class) is by passing a factory to the SkPictureRecorder class. This is to get all clients always using
factories so that we can then change the factory call used (i.e., so the factory just creates a BBH) and
do away with the SkPicture-derived classes.
BUG=skia:2315
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/239703006
git-svn-id: http://skia.googlecode.com/svn/trunk@14221 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SamplePictFile.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp index ab45555e91..11bd1f057b 100644 --- a/samplecode/SamplePictFile.cpp +++ b/samplecode/SamplePictFile.cpp @@ -18,6 +18,7 @@ #include "SkQuadTreePicture.h" #include "SkRandom.h" #include "SkRegion.h" +#include "SkRTreePicture.h" #include "SkShader.h" #include "SkTileGridPicture.h" #include "SkUtils.h" @@ -166,6 +167,7 @@ private: // no bbox playback necessary return pic.detach(); case kRTree_BBoxType: + factory.reset(SkNEW(SkRTreePictureFactory)); break; case kQuadTree_BBoxType: factory.reset(SkNEW(SkQuadTreePictureFactory)); @@ -184,8 +186,7 @@ private: } SkPictureRecorder recorder(factory); - pic->draw(recorder.beginRecording(pic->width(), pic->height(), - SkPicture::kOptimizeForClippedPlayback_RecordingFlag)); + pic->draw(recorder.beginRecording(pic->width(), pic->height())); return recorder.endRecording(); } |