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

Unified Diff: src/core/SkRecorder.cpp

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 | « src/core/SkRecorder.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 1af328afd2949a7fc3c084d995181365f63f9aeb..998fb6645babc16f3aa2b740c795a1ab90175271 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -10,9 +10,13 @@
#include "SkPatchUtils.h"
#include "SkPicture.h"
-// SkCanvas will fail in mysterious ways if it doesn't know the real width and height.
SkRecorder::SkRecorder(SkRecord* record, int width, int height)
- : SkCanvas(width, height, SkCanvas::kConservativeRasterClip_InitFlag)
+ : SkCanvas(SkIRect::MakeWH(width, height), SkCanvas::kConservativeRasterClip_InitFlag)
+ , fRecord(record)
+ , fSaveLayerCount(0) {}
+
+SkRecorder::SkRecorder(SkRecord* record, const SkRect& bounds)
+ : SkCanvas(bounds.roundOut(), SkCanvas::kConservativeRasterClip_InitFlag)
, fRecord(record)
, fSaveLayerCount(0) {}
« no previous file with comments | « src/core/SkRecorder.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698