From 4aac2f95c6befa3c1b6fde3ce4ebc20fb399f607 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Wed, 19 Aug 2020 11:30:01 -0400 Subject: [PATCH] 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 Commit-Queue: Mike Reed --- bench/RecordingBench.cpp | 4 ++-- include/core/SkPictureRecorder.h | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bench/RecordingBench.cpp b/bench/RecordingBench.cpp index a6ca1175ae..1050348f2e 100644 --- a/bench/RecordingBench.cpp +++ b/bench/RecordingBench.cpp @@ -12,8 +12,8 @@ PictureCentricBench::PictureCentricBench(const char* name, const SkPicture* pic) : fName(name) { // Flatten the source picture in case it's trivially nested (useless for timing). SkPictureRecorder rec; - pic->playback(rec.beginRecording(pic->cullRect(), nullptr, - SkPictureRecorder::kPlaybackDrawPicture_RecordFlag)); + pic->playback(rec.beginRecording(pic->cullRect(), nullptr /*, + SkPictureRecorder::kPlaybackDrawPicture_RecordFlag*/)); fSrc = rec.finishRecordingAsPicture(); } diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h index b8b35bbd97..568e747923 100644 --- a/include/core/SkPictureRecorder.h +++ b/include/core/SkPictureRecorder.h @@ -27,6 +27,9 @@ class SkRecord; class SkRecorder; class SK_API SkPictureRecorder { + enum { + kPlaybackDrawPicture_RecordFlag = 1 << 0, + }; public: SkPictureRecorder(); ~SkPictureRecorder(); @@ -34,7 +37,7 @@ public: enum RecordFlags { // 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. - kPlaybackDrawPicture_RecordFlag = 1 << 0, + kPlaybackDrawPicture_RecordFlag_hidden = 1 << 0, }; enum FinishFlags {