aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecorder.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-07-01 07:04:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-01 07:04:37 -0700
commitd711d115d28b9838303dcc232516aa2f552f3a2a (patch)
treea4ebfb7860017f4bcb3707c267ecbff4ee51e077 /src/core/SkRecorder.h
parentc0e80c139e15496a8a96eec7848689b6f0e7bcc1 (diff)
Thread through a flag to force SkPicture::playback() when recording subpictures.
This makes nanobench picture recording benchmarks somewhat useful again, as opposed to all taking about 5us to run no matter the content. ATTN Sheriff: this will probably trigger perf.skia.org alerts. BUG=skia: Review URL: https://codereview.chromium.org/1219873002
Diffstat (limited to 'src/core/SkRecorder.h')
-rw-r--r--src/core/SkRecorder.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h
index 3809ae239d..688069bd50 100644
--- a/src/core/SkRecorder.h
+++ b/src/core/SkRecorder.h
@@ -41,7 +41,8 @@ public:
SkRecorder(SkRecord*, int width, int height, SkMiniRecorder* = nullptr); // legacy version
SkRecorder(SkRecord*, const SkRect& bounds, SkMiniRecorder* = nullptr);
- void reset(SkRecord*, const SkRect& bounds, SkMiniRecorder* = nullptr);
+ enum DrawPictureMode { Record_DrawPictureMode, Playback_DrawPictureMode };
+ void reset(SkRecord*, const SkRect& bounds, DrawPictureMode, SkMiniRecorder* = nullptr);
size_t approxBytesUsedBySubPictures() const { return fApproxBytesUsedBySubPictures; }
@@ -137,6 +138,7 @@ private:
return devBounds;
}
+ DrawPictureMode fDrawPictureMode;
size_t fApproxBytesUsedBySubPictures;
SkRecord* fRecord;
SkAutoTDelete<SkDrawableList> fDrawableList;