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) {} |