diff options
author | 2016-01-11 11:14:17 -0800 | |
---|---|---|
committer | 2016-01-11 11:14:17 -0800 | |
commit | 9d22fd6e7bd1e93bb192f4de649b6b170c9d261a (patch) | |
tree | 09feb3fe2b3dde0ecc6d876f8f73bab3d6939728 /include/core/SkPixelRef.h | |
parent | b4b42ed67137b71df3ea6ccd60b4bf9f0f6e58f3 (diff) |
Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.
BUG=chromium:550559
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576983002
Review URL: https://codereview.chromium.org/1576983002
Diffstat (limited to 'include/core/SkPixelRef.h')
-rw-r--r-- | include/core/SkPixelRef.h | 5 |
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(); |