Can we remove this flag to picture-recording?

Change-Id: I08b75bee4d86b8539ee4374c699a3a1003b67784
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311725
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2020-08-19 11:30:01 -04:00 committed by Skia Commit-Bot
parent e1e2408042
commit 4aac2f95c6
2 changed files with 6 additions and 3 deletions

View File

@ -12,8 +12,8 @@
PictureCentricBench::PictureCentricBench(const char* name, const SkPicture* pic) : fName(name) { PictureCentricBench::PictureCentricBench(const char* name, const SkPicture* pic) : fName(name) {
// Flatten the source picture in case it's trivially nested (useless for timing). // Flatten the source picture in case it's trivially nested (useless for timing).
SkPictureRecorder rec; SkPictureRecorder rec;
pic->playback(rec.beginRecording(pic->cullRect(), nullptr, pic->playback(rec.beginRecording(pic->cullRect(), nullptr /*,
SkPictureRecorder::kPlaybackDrawPicture_RecordFlag)); SkPictureRecorder::kPlaybackDrawPicture_RecordFlag*/));
fSrc = rec.finishRecordingAsPicture(); fSrc = rec.finishRecordingAsPicture();
} }

View File

@ -27,6 +27,9 @@ class SkRecord;
class SkRecorder; class SkRecorder;
class SK_API SkPictureRecorder { class SK_API SkPictureRecorder {
enum {
kPlaybackDrawPicture_RecordFlag = 1 << 0,
};
public: public:
SkPictureRecorder(); SkPictureRecorder();
~SkPictureRecorder(); ~SkPictureRecorder();
@ -34,7 +37,7 @@ public:
enum RecordFlags { enum RecordFlags {
// If you call drawPicture() or drawDrawable() on the recording canvas, this flag forces // If you call drawPicture() or drawDrawable() on the recording canvas, this flag forces
// that object to playback its contents immediately rather than reffing the object. // that object to playback its contents immediately rather than reffing the object.
kPlaybackDrawPicture_RecordFlag = 1 << 0, kPlaybackDrawPicture_RecordFlag_hidden = 1 << 0,
}; };
enum FinishFlags { enum FinishFlags {