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

Unified Diff: include/core/SkPictureRecorder.h

Issue 738083002: Allow pictures to have a full bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 6 years, 1 month 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
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBBHFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPictureRecorder.h
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index de216b4e5be6f08f02ce2db76625f3e18266aaf1..528472bc2231bf4611b380265f8a9d983714ca52 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -44,16 +44,22 @@ public:
};
/** Returns the canvas that records the drawing commands.
- @param width the width of the cull rect used when recording this picture.
- @param height the height of the cull rect used when recording this picture.
+ @param bounds the cull rect used when recording this picture. Any drawing the falls outside
+ of this rect is undefined, and may be drawn or it may not.
@param bbhFactory factory to create desired acceleration structure
@param recordFlags optional flags that control recording.
@return the canvas.
*/
- SkCanvas* beginRecording(SkScalar width, SkScalar height,
+ SkCanvas* beginRecording(const SkRect& bounds,
SkBBHFactory* bbhFactory = NULL,
uint32_t recordFlags = 0);
+ SkCanvas* beginRecording(SkScalar width, SkScalar height,
+ SkBBHFactory* bbhFactory = NULL,
+ uint32_t recordFlags = 0) {
+ return this->beginRecording(SkRect::MakeWH(width, height), bbhFactory, recordFlags);
+ }
+
/** Returns the recording canvas if one is active, or NULL if recording is
not active. This does not alter the refcnt on the canvas (if present).
*/
@@ -79,8 +85,7 @@ private:
void partialReplay(SkCanvas* canvas) const;
uint32_t fFlags;
- SkScalar fCullWidth;
- SkScalar fCullHeight;
+ SkRect fCullRect;
SkAutoTUnref<SkBBoxHierarchy> fBBH;
SkAutoTUnref<SkRecorder> fRecorder;
SkAutoTDelete<SkRecord> fRecord;
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBBHFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698