Remove sRGB config checks based on color space
All of the restrictions/assumptions that led to this code are gone,
so we can always use appropriate color space.
For the YUV provider, if/when we re-introduce 8888 sRGB, the color
space will have a linear transfer function, so the color space
xform will automatically do what was happening here. That removes
the last usage of framebuffer sRGB control, so we can remove all
kinds of GrPaint and GrPipeline plumbing for that feature.
Change-Id: I24af1d498dbc75210f92f8c61b10aa31eec022f6
Reviewed-on: https://skia-review.googlesource.com/138986
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 80d54df..807fe42 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -151,10 +151,6 @@
for (int c = 0; c <= kLast_GrPixelConfig; ++c) {
desc.fConfig = static_cast<GrPixelConfig>(c);
- sk_sp<SkColorSpace> colorSpace;
- if (GrPixelConfigIsSRGB(desc.fConfig)) {
- colorSpace = SkColorSpace::MakeSRGB();
- }
if (!context->contextPriv().caps()->isConfigTexturable(desc.fConfig)) {
continue;
}
@@ -176,7 +172,7 @@
continue;
}
auto texCtx = context->contextPriv().makeWrappedSurfaceContext(
- std::move(proxy), colorSpace);
+ std::move(proxy));
SkImageInfo info = SkImageInfo::Make(
kSize, kSize, kRGBA_8888_SkColorType, kPremul_SkAlphaType);
memset(data.get(), 0xAB, kSize * kSize * sizeof(uint32_t));
@@ -201,7 +197,7 @@
// Try creating the texture as a deferred proxy.
for (int i = 0; i < 2; ++i) {
auto surfCtx = context->contextPriv().makeDeferredSurfaceContext(
- desc, origin, GrMipMapped::kNo, fit, SkBudgeted::kYes, colorSpace);
+ desc, origin, GrMipMapped::kNo, fit, SkBudgeted::kYes);
if (!surfCtx) {
continue;
}