diff options
author | 2013-09-17 12:26:23 +0000 | |
---|---|---|
committer | 2013-09-17 12:26:23 +0000 | |
commit | 07f81a57ba5720fd65563077114bd9e5ba840151 (patch) | |
tree | 346963830e041065d5ef284a00d59eb6b8216141 /include/gpu | |
parent | 6a6c6a16db2f2ea9565d67443fd62af0765dc7ca (diff) |
Baby step in making SkGpuDevice no longer derive from SkBitmapDevice
https://codereview.chromium.org/23641008/
git-svn-id: http://skia.googlecode.com/svn/trunk@11311 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/SkGpuDevice.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h index 474fc2eb11..f80ef7841b 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -63,6 +63,21 @@ public: virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; // overrides from SkBaseDevice + virtual uint32_t getDeviceCapabilities() SK_OVERRIDE { + return 0; + } + virtual int width() const SK_OVERRIDE { + return NULL == fRenderTarget ? 0 : fRenderTarget->width(); + } + 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(); + } + virtual SkBitmap::Config config() const SK_OVERRIDE; virtual void clear(SkColor color) SK_OVERRIDE; virtual void writePixels(const SkBitmap& bitmap, int x, int y, |