diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 22:27:30 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 22:27:30 +0000 |
commit | 4d164709739ae78809125cae9b8de0f3fff0d081 (patch) | |
tree | 9fe221539e1b44689e1958b2a66f621bf9ff0d4a /include | |
parent | 3f4bf51eddd9271b27e3c709939af1ff9ff1758d (diff) |
Revert "switch GatherPixelRefs to use SkBaseDevice instead of SkBitmapDevice"
This reverts commit 72958c374bdb9457419beeba7de1387da3293882.
BUG=
Review URL: https://codereview.chromium.org/58933007
git-svn-id: http://skia.googlecode.com/svn/trunk@12260 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkBitmapDevice.h | 7 | ||||
-rw-r--r-- | include/core/SkDevice.h | 8 | ||||
-rw-r--r-- | include/gpu/SkGpuDevice.h | 1 |
3 files changed, 9 insertions, 7 deletions
diff --git a/include/core/SkBitmapDevice.h b/include/core/SkBitmapDevice.h index b5265267e6..530b85c9f8 100644 --- a/include/core/SkBitmapDevice.h +++ b/include/core/SkBitmapDevice.h @@ -73,6 +73,13 @@ public: */ virtual int height() const SK_OVERRIDE { return fBitmap.height(); } + /** + * Return the bounds of the device in the coordinate space of the root + * 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 SK_OVERRIDE; + /** Returns true if the device's bitmap's config treats every pixels as implicitly opaque. */ diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index 3b925df318..22a56d007d 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -83,12 +83,7 @@ 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. */ - void getGlobalBounds(SkIRect* bounds) const { - SkASSERT(bounds); - const SkIPoint& origin = this->getOrigin(); - bounds->setXYWH(origin.x(), origin.y(), this->width(), this->height()); - } - + virtual void getGlobalBounds(SkIRect* bounds) const = 0; /** Returns true if the device's bitmap's config treats every pixel as implicitly opaque. @@ -388,7 +383,6 @@ 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 diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h index d37f63d7a0..29f59f28df 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -72,6 +72,7 @@ public: virtual int height() const SK_OVERRIDE { return NULL == fRenderTarget ? 0 : fRenderTarget->height(); } + virtual void getGlobalBounds(SkIRect* bounds) const SK_OVERRIDE; virtual bool isOpaque() const SK_OVERRIDE { return NULL == fRenderTarget ? false : kRGB_565_GrPixelConfig == fRenderTarget->config(); |