From 366093f2124c38fa5c590c9ed2d1811817fed8ee Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Tue, 13 Feb 2018 09:25:22 -0500 Subject: Make it so that GrSurfaceContext with a sRGB GrPixelConfig must have a color space with a sRGB-like gamma. Change-Id: I99b80a9846caacd6848b0f9f55ed0f7f23e69b90 Reviewed-on: https://skia-review.googlesource.com/106640 Commit-Queue: Brian Salomon Reviewed-by: Brian Osman --- tests/ReadWriteAlphaTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/ReadWriteAlphaTest.cpp') diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index e6c8c89e7d..68a3ee0983 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -178,8 +178,12 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { continue; } + sk_sp colorSpace; + if (GrPixelConfigIsSRGB(proxy->config())) { + colorSpace = SkColorSpace::MakeSRGB(); + } sk_sp sContext = context->contextPriv().makeWrappedSurfaceContext( - std::move(proxy)); + std::move(proxy), std::move(colorSpace)); for (auto rowBytes : kRowBytes) { size_t nonZeroRowBytes = rowBytes ? rowBytes : X_SIZE; -- cgit v1.2.3