aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-07-25 12:31:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-25 12:31:51 -0700
commit8fe485b793f6b3c286700988138e1395b0d33487 (patch)
treed133e684291ea67085f486c23a2e237a5cb8f6a1 /include/gpu
parent20a272d024572efa50afb436c4770341abe9e1c1 (diff)
Just pass the draw context to paint conversion
Concentrate on using draw context functionality to answer gamma and color related queries in more places. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182603003 Review-Url: https://codereview.chromium.org/2182603003
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrDrawContext.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index b8ecca051e..3cc57b5365 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -269,6 +269,10 @@ public:
GrPixelConfig config() const { return fRenderTarget->config(); }
int numColorSamples() const { return fRenderTarget->numColorSamples(); }
bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); }
+ SkSourceGammaTreatment sourceGammaTreatment() const {
+ return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect
+ : SkSourceGammaTreatment::kIgnore;
+ }
const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
SkColorSpace* getColorSpace() const { return fColorSpace.get(); }