aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkSurface_Gpu.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-02-13 21:26:48 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-13 21:29:57 +0000
commit4ffdf3c67ff7f9ee66d56db02161d66fddd9fdf7 (patch)
treedf7a154b206ea64801df1266cb69bbd91ae8c55a /src/image/SkSurface_Gpu.cpp
parentce5209a8a5711fde34f28c740f5cd74bdb560e21 (diff)
Revert "Allow linear 8888 surface contexts in GPU backend."
This reverts commit 6a46fb210b810553b2a03a5f316109ccd9710ebc. Reason for revert: breaks gms Original change's description: > Allow linear 8888 surface contexts in GPU backend. > > Make SRGBReadWritePixels test test all combinations of sRGB, untagged, and linear. > > Bug: skia: > Change-Id: I0c75fa27b1bf60c6e7ce3b666ff79e1ad1c91b94 > Reviewed-on: https://skia-review.googlesource.com/106922 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com Change-Id: Ifb28fdde315ccc0b6fc1c9dd944ea319bafba754 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/107004 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/image/SkSurface_Gpu.cpp')
-rw-r--r--src/image/SkSurface_Gpu.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 03780c099e..04333ae508 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -261,11 +261,10 @@ bool SkSurface_Gpu::Valid(GrContext* context, GrPixelConfig config, SkColorSpace
return context->caps()->srgbSupport() && colorSpace && colorSpace->gammaCloseToSRGB();
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
- // We may get here with either a linear-gamma color space or with a sRGB-gamma color
- // space when we lack GPU sRGB support.
+ // If we don't have sRGB support, we may get here with a color space. It still needs
+ // to be sRGB-like (so that the application will work correctly on sRGB devices.)
return !colorSpace ||
- (colorSpace->gammaCloseToSRGB() && !context->caps()->srgbSupport()) ||
- colorSpace->gammaIsLinear();
+ (colorSpace->gammaCloseToSRGB() && !context->caps()->srgbSupport());
default:
return !colorSpace;
}