Chromium Code Reviews| Index: include/gpu/GrPaint.h |
| diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h |
| index 87e036865585758a8ff63e770b8e2e345ecfdff0..f9633e79788af716951b5b7a27df4f7a05a5cc4e 100644 |
| --- a/include/gpu/GrPaint.h |
| +++ b/include/gpu/GrPaint.h |
| @@ -70,6 +70,15 @@ public: |
| void setAllowSRGBInputs(bool allowSRGBInputs) { fAllowSRGBInputs = allowSRGBInputs; } |
| bool getAllowSRGBInputs() const { return fAllowSRGBInputs; } |
| + /** |
| + * Should rendering be gamma-correct. Causes sRGB inputs to perform conversion to linear, |
| + * and outputs to be converted from linear to sRGB (if the destination is sRGB). |
| + */ |
| + void setGammaCorrect(bool gammaCorrect) { |
|
Brian Osman
2016/04/13 19:54:52
Added this helper method in this change to make ca
bsalomon
2016/04/13 20:03:38
sgtm
|
| + setDisableOutputConversionToSRGB(!gammaCorrect); |
| + setAllowSRGBInputs(gammaCorrect); |
| + } |
| + |
| const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { |
| fXPFactory.reset(SkSafeRef(xpFactory)); |
| return xpFactory; |