aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrYUVProvider.h
diff options
context:
space:
mode:
authorGravatar Christopher Cameron <ccameron@chromium.org>2017-07-08 01:47:47 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-10 17:45:28 +0000
commit77e966647f6b495fe44772086c709528c711fc6e (patch)
treeab864785bf834f2743537c662fe90a4bb592ba39 /src/gpu/GrYUVProvider.h
parent62ae664e7491f77e1746a42418661c20c256c26d (diff)
Make SkImage_Lazy::onMakeColorSpace return a SkImage_Lazy
Make SkImage_Lazy::onMakeColorSpace return a new SkImage_Lazy with the color space of SkImage_Lazy::fInfo changed. Update the call to SkImageGenerator::getPixels to specify image info with this new color space. Update the call to SkImageGenerator::generateTexture to specify this new color space. Update SkPictureImageGenerator to respect the color space argument. Add a SkTransferFunctionBehavior argument to SkImageGenerator::generateTexture to indicate if color conversion is to be doing using an xform canvas. Update Generator_GrYUVProvider::refAsTextureProxy to include a color conversion step to respect this new color space. TBR=reed@google.com Bug:739559 Change-Id: I156a858884659e9dfae739a653bab2ef89274959 Reviewed-on: https://skia-review.googlesource.com/21605 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Christopher Cameron <ccameron@chromium.org> Reviewed-by: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrYUVProvider.h')
-rw-r--r--src/gpu/GrYUVProvider.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrYUVProvider.h b/src/gpu/GrYUVProvider.h
index b5be426f6d..372a26a340 100644
--- a/src/gpu/GrYUVProvider.h
+++ b/src/gpu/GrYUVProvider.h
@@ -32,11 +32,15 @@ public:
* On success, this returns a texture proxy that has converted the YUV data from the provider
* into a form that is supported by the GPU (typically transformed into RGB). If useCache
* is true, then the texture will automatically have a key added, so it can be retrieved
- * from the cache (assuming it is requested by a provider w/ the same genID).
+ * from the cache (assuming it is requested by a provider w/ the same genID). If srcColorSpace
+ * and dstColorSpace are specified, then a color conversion from src to dst will be applied to
+ * the pixels.
*
* On failure (e.g. the provider had no data), this returns NULL.
*/
- sk_sp<GrTextureProxy> refAsTextureProxy(GrContext*, const GrSurfaceDesc&, bool useCache);
+ sk_sp<GrTextureProxy> refAsTextureProxy(GrContext*, const GrSurfaceDesc&, bool useCache,
+ const SkColorSpace* srcColorSpace,
+ const SkColorSpace* dstColorSpace);
virtual uint32_t onGetID() = 0;