| Index: include/core/SkDevice.h
|
| diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
|
| index 22a56d007de034749791b33d7d1e82cd462cf78e..9801c43e2ba7c7a4ac64de6fab230c079d6cdf15 100644
|
| --- a/include/core/SkDevice.h
|
| +++ b/include/core/SkDevice.h
|
| @@ -83,7 +83,12 @@ public:
|
| * canvas. The root device will have its top-left at 0,0, but other devices
|
| * such as those associated with saveLayer may have a non-zero origin.
|
| */
|
| - virtual void getGlobalBounds(SkIRect* bounds) const = 0;
|
| + void getGlobalBounds(SkIRect* bounds) const {
|
| + SkASSERT(bounds);
|
| + const SkIPoint& origin = this->getOrigin();
|
| + bounds->setXYWH(origin.x(), origin.y(), this->width(), this->height());
|
| + }
|
| +
|
|
|
| /** Returns true if the device's bitmap's config treats every pixel as
|
| implicitly opaque.
|
|
|