aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPixelRef.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-01-11 11:14:17 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-11 11:14:17 -0800
commit9d22fd6e7bd1e93bb192f4de649b6b170c9d261a (patch)
tree09feb3fe2b3dde0ecc6d876f8f73bab3d6939728 /include/core/SkPixelRef.h
parentb4b42ed67137b71df3ea6ccd60b4bf9f0f6e58f3 (diff)
Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.
Diffstat (limited to 'include/core/SkPixelRef.h')
-rw-r--r--include/core/SkPixelRef.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 4591ed82bf..9cdcd85a79 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -225,7 +225,8 @@ public:
return this->onGetYUV8Planes(sizes, planes, rowBytes, colorSpace);
}
- bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL);
+ /** Populates dst with the pixels of this pixelRef, converting them to colorType. */
+ bool readPixels(SkBitmap* dst, SkColorType colorType, const SkIRect* subset = NULL);
/**
* Makes a deep copy of this PixelRef, respecting the requested config.
@@ -299,7 +300,7 @@ protected:
*
* The base class implementation returns false;
*/
- virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subsetOrNull);
+ virtual bool onReadPixels(SkBitmap* dst, SkColorType colorType, const SkIRect* subsetOrNull);
// default impl returns NULL.
virtual SkData* onRefEncodedData();