Index: gm/surface.cpp |
diff --git a/gm/surface.cpp b/gm/surface.cpp |
index e104cb5ecf619040a463766310bbef75ae8eefd0..503b887f1fa12691f05e20118d358cf9bf3bf06d 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 allowSRGBInputs) { |
+ int disallowAA, int disallowDither, bool gammaCorrect) { |
uint32_t flags = 0; |
if (disallowAA) { |
flags |= SkSurfaceProps::kDisallowAntiAlias_Flag; |
@@ -30,8 +30,8 @@ static sk_sp<SkSurface> make_surface(GrContext* ctx, const SkImageInfo& info, Sk |
if (disallowDither) { |
flags |= SkSurfaceProps::kDisallowDither_Flag; |
} |
- if (allowSRGBInputs) { |
- flags |= SkSurfaceProps::kAllowSRGBInputs_Flag; |
+ if (gammaCorrect) { |
+ flags |= SkSurfaceProps::kGammaCorrect_Flag; |
} |
SkSurfaceProps props(flags, geo); |
@@ -80,7 +80,7 @@ protected: |
const SkImageInfo info = SkImageInfo::MakeN32(W, H, kOpaque_SkAlphaType, |
canvas->imageInfo().profileType()); |
SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType); |
- bool allowSRGBInputs = canvas->getProps(&canvasProps) && canvasProps.allowSRGBInputs(); |
+ bool gammaCorrrect = canvas->getProps(&canvasProps) && canvasProps.isGammaCorrect(); |
const struct { |
SkPixelGeometry fGeo; |
@@ -99,7 +99,7 @@ protected: |
SkScalar y = 0; |
for (size_t i = 0; i < SK_ARRAY_COUNT(rec); ++i) { |
auto surface(make_surface(ctx, info, rec[i].fGeo, disallowAA, disallowDither, |
- allowSRGBInputs)); |
+ gammaCorrrect)); |
test_draw(surface->getCanvas(), rec[i].fLabel); |
surface->draw(canvas, x, y, nullptr); |
y += H; |