diff options
author | Brian Osman <brianosman@google.com> | 2018-06-01 16:10:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-01 20:50:56 +0000 |
commit | 9363ac40b66b761634c077c50617bf6c6fb3f3ea (patch) | |
tree | 918ba8a306af73ec33071f301e9b20b45fa58edd /src/gpu/GrSurfaceProxy.cpp | |
parent | b54d2239d36f60087efb2611d320364d7b06374c (diff) |
Remove most of the remaining conflation of colorSpace and sRGB in Ganesh
Change-Id: I22cd838f15c548b459da925cd7e7d228f95fb2e2
Reviewed-on: https://skia-review.googlesource.com/131583
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceProxy.cpp')
-rw-r--r-- | src/gpu/GrSurfaceProxy.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp index dd15b18bd4..fe8641a04f 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp @@ -323,18 +323,8 @@ sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrContext* context, dstDesc.fHeight = srcRect.height(); dstDesc.fConfig = src->config(); - // We use an ephemeral surface context to make the copy. Here it isn't clear what color space - // to tag it with. That's ok because GrSurfaceContext::copy doesn't do any color space - // conversions. However, if the pixel config is sRGB then the passed color space here must - // have sRGB gamma or GrSurfaceContext creation fails. See skbug.com/7611 about making this - // with the correct color space information and returning the context to the caller. - sk_sp<SkColorSpace> colorSpace; - if (GrPixelConfigIsSRGB(dstDesc.fConfig)) { - colorSpace = SkColorSpace::MakeSRGB(); - } sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext( - dstDesc, src->origin(), mipMapped, SkBackingFit::kExact, budgeted, - std::move(colorSpace))); + dstDesc, src->origin(), mipMapped, SkBackingFit::kExact, budgeted)); if (!dstContext) { return nullptr; } |