Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: src/core/SkPictureRecorder.cpp

Issue 1178673007: Allow reset of the SkPictureRecorder cull rect before endRecording. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove recordFlags from new method Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkPictureRecorder.cpp
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index 877314ccafd98bca89c89a19e97f3f5bcad3acef..8254801d6960fcc5ea47280250159a264d82e8bf 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -95,6 +95,19 @@ SkPicture* SkPictureRecorder::endRecordingAsPicture() {
subPictureBytes));
}
+SkPicture* SkPictureRecorder::endRecordingAsPicture(const SkRect& cullRect,
+ SkBBHFactory* bbhFactory /* = NULL */) {
+ fCullRect = cullRect;
+
+ if (bbhFactory) {
+ fBBH.reset((*bbhFactory)(cullRect));
+ SkASSERT(fBBH.get());
+ }
+
+ return this->endRecordingAsPicture();
+}
+
+
void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
if (NULL == canvas) {
return;

Powered by Google App Engine
This is Rietveld 408576698