aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-07-26 11:36:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-26 11:36:05 -0700
commit3a0dbde1cfa84b08c7dd5b597142e9f6179f2d07 (patch)
tree8415ee29b45878e0c304955b4553fda4431c1d5f /tools/viewer
parentdc2257bfab9fc232f96c6db0595b9d12b2f0cf36 (diff)
Remove SkSurfaceProps gamma-correctness flag entirely.
This is no longer required - gamma-correctness is now just based on the presence or absence of a color space. Public API change is just removal of (unused) flag. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188463002 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2188463002
Diffstat (limited to 'tools/viewer')
-rwxr-xr-xtools/viewer/sk_app/WindowContext.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/viewer/sk_app/WindowContext.cpp b/tools/viewer/sk_app/WindowContext.cpp
index 5d364bc497..458f66a67b 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);
}
}