diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 22:14:08 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 22:14:08 +0000 |
commit | 3f4bf51eddd9271b27e3c709939af1ff9ff1758d (patch) | |
tree | 2d2b521611a0e3b375b9bfcc69295b0b40cbcc0b /include/core/SkDevice.h | |
parent | 04068b13e5ec0c0aa2ab0fe82990ec8146c33243 (diff) |
switch GatherPixelRefs to use SkBaseDevice instead of SkBitmapDevice
BUG=
R=robertphillips@google.com, scroggo@google.com
Review URL: https://codereview.chromium.org/70473003
git-svn-id: http://skia.googlecode.com/svn/trunk@12259 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkDevice.h')
-rw-r--r-- | include/core/SkDevice.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index 22a56d007d..3b925df318 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. @@ -383,6 +388,7 @@ private: // used to change the backend's pixels (and possibly config/rowbytes) // but cannot change the width/height, so there should be no change to // any clip information. + // TODO: move to SkBitmapDevice virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) = 0; // just called by SkCanvas when built as a layer |