diff options
author | rileya <rileya@chromium.org> | 2014-09-12 17:45:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-12 17:45:58 -0700 |
commit | abaef86f2b37d8a939506a2076da07f6db456951 (patch) | |
tree | e206bd6ee9f049c43c0ba9033c8417bb5008258c /include/core/SkPixelRef.h | |
parent | 94c415170b6f62fa80b598fe30bf2f99f0aecf6a (diff) |
Add support for the Rec601 YUV color space to GrYUVtoRGBEffect.
R=bsalomon@google.com, senorblanco@chromium.org, sugoi@chromium.org, reed@google.com
Author: rileya@chromium.org
Review URL: https://codereview.chromium.org/516463005
Diffstat (limited to 'include/core/SkPixelRef.h')
-rw-r--r-- | include/core/SkPixelRef.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h index afab7fad9e..02d696edd8 100644 --- a/include/core/SkPixelRef.h +++ b/include/core/SkPixelRef.h @@ -227,9 +227,13 @@ public: * If all planes and rowBytes are not NULL, then it should copy the associated Y,U,V data * into those planes of memory supplied by the caller. It should validate that the sizes * match what it expected. If the sizes do not match, it should return false. + * + * If colorSpace is not NULL, the YUV color space of the data should be stored in the address + * it points at. */ - bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]) { - return this->onGetYUV8Planes(sizes, planes, rowBytes); + bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], + SkYUVColorSpace* colorSpace) { + return this->onGetYUV8Planes(sizes, planes, rowBytes, colorSpace); } bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL); @@ -319,7 +323,8 @@ protected: virtual SkData* onRefEncodedData(); // default impl returns false. - virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]); + virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], + SkYUVColorSpace* colorSpace); /** * Returns the size (in bytes) of the internally allocated memory. |