aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 32907ae274..12e7670029 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -131,7 +131,12 @@ sk_sp<GrTextureProxy> GrCopyBaseMipMapToTextureProxy(GrContext* ctx, GrTexturePr
}
// Copy the base layer to our proxy
- sk_sp<GrSurfaceContext> sContext = ctx->contextPriv().makeWrappedSurfaceContext(proxy);
+ sk_sp<SkColorSpace> colorSpace;
+ if (GrPixelConfigIsSRGB(proxy->config())) {
+ colorSpace = SkColorSpace::MakeSRGB();
+ }
+ sk_sp<GrSurfaceContext> sContext =
+ ctx->contextPriv().makeWrappedSurfaceContext(proxy, std::move(colorSpace));
SkASSERT(sContext);
SkAssertResult(sContext->copy(baseProxy));