Index: src/core/SkBitmapDevice.cpp |
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp |
index 5fae2b58625493a6191df64d6a45824ff058e79e..5b2fc38e321cc48f6e6aff68f822e92fd8bcf727 100644 |
--- a/src/core/SkBitmapDevice.cpp |
+++ b/src/core/SkBitmapDevice.cpp |
@@ -103,6 +103,11 @@ SkImageInfo SkBitmapDevice::imageInfo() const { |
return fBitmap.info(); |
} |
+void SkBitmapDevice::setNewSize(const SkISize& size) { |
+ SkASSERT(!fBitmap.pixelRef()); |
+ fBitmap.setInfo(fBitmap.info().makeWH(size.fWidth, size.fHeight)); |
+} |
+ |
void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) { |
SkASSERT(bm.width() == fBitmap.width()); |
SkASSERT(bm.height() == fBitmap.height()); |