Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 31a9a7970bbb5ba296171eae0d251effa67e071e..4fda7a37b32a306aea9b229c083769acd44e0c1b 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -431,7 +431,7 @@ |
} |
device->onAttachToCanvas(this); |
fMCRec->fLayer->fDevice = SkRef(device); |
- fMCRec->fRasterClip.setRect(device->getGlobalBounds()); |
+ fMCRec->fRasterClip.setRect(SkIRect::MakeWH(device->width(), device->height())); |
} |
return device; |
} |
@@ -453,11 +453,7 @@ |
class SkNoPixelsBitmapDevice : public SkBitmapDevice { |
public: |
- SkNoPixelsBitmapDevice(const SkIRect& bounds) |
- : INHERITED(make_nopixels(bounds.width(), bounds.height())) |
- { |
- this->setOrigin(bounds.x(), bounds.y()); |
- } |
+ SkNoPixelsBitmapDevice(int width, int height) : INHERITED(make_nopixels(width, height)) {} |
private: |
@@ -470,17 +466,16 @@ |
{ |
inc_canvas(); |
- this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice, |
- (SkIRect::MakeWH(width, height))), kDefault_InitFlags)->unref(); |
-} |
- |
-SkCanvas::SkCanvas(const SkIRect& bounds, InitFlags flags) |
+ this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice, (width, height)), kDefault_InitFlags)->unref(); |
+} |
+ |
+SkCanvas::SkCanvas(int width, int height, InitFlags flags) |
: fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) |
, fProps(SkSurfaceProps::kLegacyFontHost_InitType) |
{ |
inc_canvas(); |
- this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice, (bounds)), flags)->unref(); |
+ this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice, (width, height)), flags)->unref(); |
} |
SkCanvas::SkCanvas(SkBaseDevice* device, const SkSurfaceProps* props, InitFlags flags) |