Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: src/gpu/GrContext.cpp

Issue 791823003: Add sRGB texture support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add in changes for copy_to_new_texture_pixelref Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index cc6a63726766a1bda2e7ed51f9547727c6d86197..c637101d072881f2f3fc464df48cc7510fc39a97 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1222,7 +1222,7 @@ void GrContext::flush(int flagsBitfield) {
bool sw_convert_to_premul(GrPixelConfig srcConfig, int width, int height, size_t inRowBytes,
const void* inPixels, size_t outRowBytes, void* outPixels) {
SkSrcPixelInfo srcPI;
- if (!GrPixelConfig2ColorType(srcConfig, &srcPI.fColorType)) {
+ if (!GrPixelConfig2ColorAndProfileType(srcConfig, &srcPI.fColorType, NULL)) {
return false;
}
srcPI.fAlphaType = kUnpremul_SkAlphaType;
@@ -1483,7 +1483,7 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target,
// Perform any conversions we weren't able to perform using a scratch texture.
if (unpremul || swapRAndB) {
SkDstPixelInfo dstPI;
- if (!GrPixelConfig2ColorType(dstConfig, &dstPI.fColorType)) {
+ if (!GrPixelConfig2ColorAndProfileType(dstConfig, &dstPI.fColorType, NULL)) {
return false;
}
dstPI.fAlphaType = kUnpremul_SkAlphaType;
« include/core/SkPixelRef.h ('K') | « src/core/SkBitmap.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698