aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-07-26 10:21:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-26 10:21:55 -0700
commit9dc935fa11521d4a6c7875699c050044a45d0871 (patch)
tree53ff5ac83820ebe50368f59610e2eaf751f113d3 /include/gpu
parenta5e1e33d3916cf766f876d3def88afb373440a04 (diff)
Remove all usage of SkSurfaceProps::isGammaCorrect()
DrawContext's isGammaCorrect now just based on presence of color space. Next change will remove the function and flag entirely, but I wanted to land this separately. This alters a few GMs in srgb/f16 mode, generally those that are creating off-screen surfaces in ways that were somewhat lossy before. No unexplained changes. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186633002 Review-Url: https://codereview.chromium.org/2186633002
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrDrawContext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index 01f4ac963b..d5bde08288 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -274,7 +274,7 @@ public:
int height() const { return fRenderTarget->height(); }
GrPixelConfig config() const { return fRenderTarget->config(); }
int numColorSamples() const { return fRenderTarget->numColorSamples(); }
- bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); }
+ bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); }
SkSourceGammaTreatment sourceGammaTreatment() const {
return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect
: SkSourceGammaTreatment::kIgnore;