From 1a8ddf0a35bfb6c21a1184f81d2fdd50053acf31 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Wed, 2 Nov 2011 19:34:16 +0000 Subject: Changes the SkCanvas::readPixels API. Allows caller to read into prealloced bitmap pixels. Changes how clipping to device bounds is handled. Review URL: http://codereview.appspot.com/5307077/ git-svn-id: http://skia.googlecode.com/svn/trunk@2584 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/gpu/SkGpuDevice.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/gpu/SkGpuDevice.h') diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h index f5613a7fd8..047fd0740c 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -68,7 +68,6 @@ public: // overrides from SkDevice virtual void clear(SkColor color); - virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap); virtual void writePixels(const SkBitmap& bitmap, int x, int y); virtual void setMatrixClip(const SkMatrix& matrix, const SkRegion& clip, @@ -140,6 +139,11 @@ protected: TexCache fTex; }; friend class SkAutoTexCache; + + // overrides from SkDevice + virtual bool onReadPixels(const SkBitmap* bitmap, + int x, int y) SK_OVERRIDE; + private: GrContext* fContext; -- cgit v1.2.3