Index: include/gpu/GrDrawContext.h |
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h |
index b8ecca051e189a9455d76f1a175ed80052bbc860..3cc57b5365a64fd43e739a6f0887dda498dd7288 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(); } |