Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Unified Diff: src/views/SkWindow.cpp

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/win/SkWGL_win.cpp ('k') | src/views/ios/SkOSWindow_iOS.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/SkWindow.cpp
diff --git a/src/views/SkWindow.cpp b/src/views/SkWindow.cpp
index 244bc4974219b44f4c42218cdfa1ec4f90c6cd3d..d06d6bb9eb4a3b6bf250f7f2946b51239ea83ae9 100644
--- a/src/views/SkWindow.cpp
+++ b/src/views/SkWindow.cpp
@@ -340,9 +340,14 @@ GrRenderTarget* SkWindow::renderTarget(const AttachmentInfo& attachmentInfo,
//
// Also, we may not have real sRGB support (ANGLE, in particular), so check for
// that, and fall back to L32:
- desc.fConfig = grContext->caps()->srgbSupport() && SkImageInfoIsGammaCorrect(info())
- ? kSkiaGamma8888_GrPixelConfig
- : kSkia8888_GrPixelConfig;
+ //
+ // ... and, if we're using a 10-bit/channel FB0, it doesn't do sRGB conversion on write,
+ // so pretend that it's non-sRGB 8888:
+ desc.fConfig =
+ grContext->caps()->srgbSupport() &&
+ SkImageInfoIsGammaCorrect(info()) &&
+ (attachmentInfo.fColorBits != 30)
+ ? kSkiaGamma8888_GrPixelConfig : kSkia8888_GrPixelConfig;
desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
desc.fSampleCnt = attachmentInfo.fSampleCount;
desc.fStencilBits = attachmentInfo.fStencilBits;
« no previous file with comments | « src/utils/win/SkWGL_win.cpp ('k') | src/views/ios/SkOSWindow_iOS.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698