diff options
author | 2016-12-22 11:12:16 -0500 | |
---|---|---|
committer | 2016-12-22 16:44:56 +0000 | |
commit | b62ea2240ffbc28bdf2469464e232f674f59584b (patch) | |
tree | 98d0f0f24c82a81b839dd23f482b207150044698 /src/image | |
parent | 17f811bf75a15dd296e5fcea9029fd2a1f4a631d (diff) |
Change GPU read/write pixels API to support color space conversion
GrContext still doesn't convert, but it has the source and destination
color spaces, and call sites are supplying appropriate values where it
makes sense.
BUG=skia:
Change-Id: Ia88733125b8090776cfc9b0dc8030cce365b0b8b
Reviewed-on: https://skia-review.googlesource.com/6400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkImage_Gpu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index c347a1f606..cdbdd7cee2 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -130,8 +130,8 @@ bool SkImage_Gpu::onReadPixels(const SkImageInfo& info, void* pixels, size_t row // let the GPU perform this transformation for us flags = GrContext::kUnpremul_PixelOpsFlag; } - if (!fTexture->readPixels(srcX, srcY, info.width(), info.height(), config, - pixels, rowBytes, flags)) { + if (!fTexture->readPixels(fColorSpace.get(), srcX, srcY, info.width(), info.height(), config, + info.colorSpace(), pixels, rowBytes, flags)) { return false; } // do we have to manually fix-up the alpha channel? |