Index: src/core/SkBitmapDevice.cpp |
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp |
index 030331ac51820b4207b2a1ef01aed9414c1773e0..637048742a1a12ddfec1fbdb2bd576618aa71bc1 100644 |
--- a/src/core/SkBitmapDevice.cpp |
+++ b/src/core/SkBitmapDevice.cpp |
@@ -77,6 +77,14 @@ void SkBitmapDevice::unlockPixels() { |
} |
} |
+void SkBitmapDevice::getGlobalBounds(SkIRect* bounds) const { |
+ if (NULL != bounds) { |
+ const SkIPoint& origin = this->getOrigin(); |
+ bounds->setXYWH(origin.x(), origin.y(), |
+ fBitmap.width(), fBitmap.height()); |
+ } |
+} |
+ |
void SkBitmapDevice::clear(SkColor color) { |
fBitmap.eraseColor(color); |
} |