diff options
author | brianosman <brianosman@google.com> | 2016-07-26 11:36:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-26 11:36:05 -0700 |
commit | 3a0dbde1cfa84b08c7dd5b597142e9f6179f2d07 (patch) | |
tree | 8415ee29b45878e0c304955b4553fda4431c1d5f /gm/surface.cpp | |
parent | dc2257bfab9fc232f96c6db0595b9d12b2f0cf36 (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 'gm/surface.cpp')
-rw-r--r-- | gm/surface.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gm/surface.cpp b/gm/surface.cpp index bae77c5594..6846f727e2 100644 --- a/gm/surface.cpp +++ b/gm/surface.cpp @@ -22,7 +22,7 @@ static sk_sp<SkShader> make_shader() { } static sk_sp<SkSurface> make_surface(GrContext* ctx, const SkImageInfo& info, SkPixelGeometry geo, - int disallowAA, int disallowDither, bool gammaCorrect) { + int disallowAA, int disallowDither) { uint32_t flags = 0; if (disallowAA) { flags |= SkSurfaceProps::kDisallowAntiAlias_Flag; @@ -30,9 +30,6 @@ static sk_sp<SkSurface> make_surface(GrContext* ctx, const SkImageInfo& info, Sk if (disallowDither) { flags |= SkSurfaceProps::kDisallowDither_Flag; } - if (gammaCorrect) { - flags |= SkSurfaceProps::kGammaCorrect_Flag; - } SkSurfaceProps props(flags, geo); if (ctx) { @@ -79,8 +76,6 @@ protected: // must be opaque to have a hope of testing LCD text const SkImageInfo info = SkImageInfo::MakeN32(W, H, kOpaque_SkAlphaType, sk_ref_sp(canvas->imageInfo().colorSpace())); - SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType); - bool gammaCorrect = canvas->getProps(&canvasProps) && canvasProps.isGammaCorrect(); const struct { SkPixelGeometry fGeo; @@ -98,8 +93,7 @@ protected: for (int disallowDither = 0; disallowDither <= 1; ++disallowDither) { SkScalar y = 0; for (const auto& rec : recs) { - auto surface(make_surface(ctx, info, rec.fGeo, disallowAA, disallowDither, - gammaCorrect)); + auto surface(make_surface(ctx, info, rec.fGeo, disallowAA, disallowDither)); if (!surface) { SkDebugf("failed to create surface! label: %s AA: %s dither: %s\n", rec.fLabel, (disallowAA == 1 ? "disallowed" : "allowed"), |