aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skiaserve
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/skiaserve
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/skiaserve')
-rw-r--r--tools/skiaserve/Request.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index f61ed5554a..edc0a6820b 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -161,13 +161,12 @@ namespace {
struct ColorAndProfile {
SkColorType fColorType;
bool fSRGB;
- bool fGammaCorrect;
};
ColorAndProfile ColorModes[] = {
- { kN32_SkColorType, false, false },
- { kN32_SkColorType, true, true },
- { kRGBA_F16_SkColorType, true, true },
+ { kN32_SkColorType, false },
+ { kN32_SkColorType, true },
+ { kRGBA_F16_SkColorType, true },
};
}
@@ -178,9 +177,7 @@ SkSurface* Request::createCPUSurface() {
auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
SkImageInfo info = SkImageInfo::Make(bounds.width(), bounds.height(), cap.fColorType,
kPremul_SkAlphaType, cap.fSRGB ? srgbColorSpace : nullptr);
- uint32_t flags = cap.fGammaCorrect ? SkSurfaceProps::kGammaCorrect_Flag : 0;
- SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- return SkSurface::MakeRaster(info, &props).release();
+ return SkSurface::MakeRaster(info).release();
}
SkSurface* Request::createGPUSurface() {
@@ -190,10 +187,7 @@ SkSurface* Request::createGPUSurface() {
auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
SkImageInfo info = SkImageInfo::Make(bounds.width(), bounds.height(), cap.fColorType,
kPremul_SkAlphaType, cap.fSRGB ? srgbColorSpace : nullptr);
- uint32_t flags = cap.fGammaCorrect ? SkSurfaceProps::kGammaCorrect_Flag : 0;
- SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- SkSurface* surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0,
- &props).release();
+ SkSurface* surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info).release();
return surface;
}