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

Unified Diff: tools/viewer/sk_app/WindowContext.cpp

Issue 2188463002: Remove SkSurfaceProps gamma-correctness flag entirely. (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-is-gamma-correct
Patch Set: Created 4 years, 5 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 | « tools/skiaserve/Request.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/WindowContext.cpp
diff --git a/tools/viewer/sk_app/WindowContext.cpp b/tools/viewer/sk_app/WindowContext.cpp
index 5d364bc497bf8273572480c19af6f035c428f2c2..458f66a67b9a74fb4f99ab4d1715be2ebe89b5fa 100755
--- a/tools/viewer/sk_app/WindowContext.cpp
+++ b/tools/viewer/sk_app/WindowContext.cpp
@@ -31,11 +31,6 @@ sk_sp<SkSurface> WindowContext::createRenderSurface(GrBackendRenderTargetDesc de
sk_sp<SkSurface> WindowContext::createSurface(
GrBackendRenderTargetDesc* rtDesc, int colorBits, bool offscreen, bool forceSRGB) {
- auto flags = (fSurfaceProps.flags() & ~SkSurfaceProps::kGammaCorrect_Flag) |
- (GrPixelConfigIsSRGB(fPixelConfig) || forceSRGB ?
- SkSurfaceProps::kGammaCorrect_Flag : 0);
- SkSurfaceProps props(flags, fSurfaceProps.pixelGeometry());
-
if (!this->isGpuContext() || colorBits > 24 || offscreen ||
kRGBA_F16_SkColorType == fDisplayParams.fColorType) {
// If we're rendering to F16, we need an off-screen surface - the current render
@@ -52,12 +47,12 @@ sk_sp<SkSurface> WindowContext::createSurface(
);
if (this->isGpuContext()) {
return SkSurface::MakeRenderTarget(fContext, SkBudgeted::kNo, info,
- fDisplayParams.fMSAASampleCount, &props);
+ fDisplayParams.fMSAASampleCount, &fSurfaceProps);
} else {
- return SkSurface::MakeRaster(info, &props);
+ return SkSurface::MakeRaster(info, &fSurfaceProps);
}
} else {
- return SkSurface::MakeFromBackendRenderTarget(fContext, *rtDesc, &props);
+ return SkSurface::MakeFromBackendRenderTarget(fContext, *rtDesc, &fSurfaceProps);
}
}
« no previous file with comments | « tools/skiaserve/Request.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698