aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContext.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-12-22 11:12:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-22 16:44:56 +0000
commitb62ea2240ffbc28bdf2469464e232f674f59584b (patch)
tree98d0f0f24c82a81b839dd23f482b207150044698 /src/gpu/GrRenderTargetContext.cpp
parent17f811bf75a15dd296e5fcea9029fd2a1f4a631d (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/gpu/GrRenderTargetContext.cpp')
-rw-r--r--src/gpu/GrRenderTargetContext.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 10881de087..dcb1d0b2f7 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1286,8 +1286,8 @@ bool GrRenderTargetContext::readPixels(const SkImageInfo& dstInfo, void* dstBuff
return false;
}
- return rt->readPixels(x, y, dstInfo.width(), dstInfo.height(),
- config, dstBuffer, dstRowBytes, flags);
+ return rt->readPixels(this->getColorSpace(), x, y, dstInfo.width(), dstInfo.height(),
+ config, dstInfo.colorSpace(), dstBuffer, dstRowBytes, flags);
}
bool GrRenderTargetContext::writePixels(const SkImageInfo& srcInfo, const void* srcBuffer,
@@ -1309,8 +1309,8 @@ bool GrRenderTargetContext::writePixels(const SkImageInfo& srcInfo, const void*
return false;
}
- return rt->writePixels(x, y, srcInfo.width(), srcInfo.height(),
- config, srcBuffer, srcRowBytes, flags);
+ return rt->writePixels(this->getColorSpace(), x, y, srcInfo.width(), srcInfo.height(),
+ config, srcInfo.colorSpace(), srcBuffer, srcRowBytes, flags);
}
// Can 'path' be drawn as a pair of filled nested rectangles?