Index: include/gpu/GrPaint.h |
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h |
index 152cb51d7e7144373e360abf0c611c92db453c91..3f06f092ab45fe55b132252f2d647356c0feefe8 100644 |
--- a/include/gpu/GrPaint.h |
+++ b/include/gpu/GrPaint.h |
@@ -56,6 +56,13 @@ public: |
void setAntiAlias(bool aa) { fAntiAlias = aa; } |
bool isAntiAlias() const { return fAntiAlias; } |
+ /** |
+ * Should shader output conversion from linear to sRGB be disabled. |
+ * Only relevant if the destination is sRGB. Defaults to false. |
+ */ |
+ void setDisableOutputConversionToSRGB(bool srgb) { fDisableOutputConversionToSRGB = srgb; } |
+ bool getDisableOutputConversionToSRGB() const { return fDisableOutputConversionToSRGB; } |
+ |
const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { |
fXPFactory.reset(SkSafeRef(xpFactory)); |
return xpFactory; |
@@ -112,6 +119,7 @@ public: |
GrPaint& operator=(const GrPaint& paint) { |
fAntiAlias = paint.fAntiAlias; |
+ fDisableOutputConversionToSRGB = paint.fDisableOutputConversionToSRGB; |
fColor = paint.fColor; |
this->resetFragmentProcessors(); |
@@ -154,6 +162,7 @@ private: |
SkSTArray<2, const GrFragmentProcessor*, true> fCoverageFragmentProcessors; |
bool fAntiAlias; |
+ bool fDisableOutputConversionToSRGB; |
GrColor fColor; |
}; |