| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef GrPaint_DEFINED | 10 #ifndef GrPaint_DEFINED |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 bool getDisableOutputConversionToSRGB() const { return fDisableOutputConvers
ionToSRGB; } | 64 bool getDisableOutputConversionToSRGB() const { return fDisableOutputConvers
ionToSRGB; } |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * Should sRGB inputs be allowed to perform sRGB to linear conversion. With
this flag | 67 * Should sRGB inputs be allowed to perform sRGB to linear conversion. With
this flag |
| 68 * set to false, sRGB textures will be treated as linear (including filterin
g). | 68 * set to false, sRGB textures will be treated as linear (including filterin
g). |
| 69 */ | 69 */ |
| 70 void setAllowSRGBInputs(bool allowSRGBInputs) { fAllowSRGBInputs = allowSRGB
Inputs; } | 70 void setAllowSRGBInputs(bool allowSRGBInputs) { fAllowSRGBInputs = allowSRGB
Inputs; } |
| 71 bool getAllowSRGBInputs() const { return fAllowSRGBInputs; } | 71 bool getAllowSRGBInputs() const { return fAllowSRGBInputs; } |
| 72 | 72 |
| 73 /** | 73 /** |
| 74 * Should rendering be gamma-correct. Causes sRGB inputs to perform conversi
on to linear, | 74 * Should rendering be gamma-correct, end-to-end. Causes sRGB render targets
to behave |
| 75 * and outputs to be converted from linear to sRGB (if the destination is sR
GB). | 75 * as such (with linear blending), and sRGB inputs to be filtered and decode
d correctly. |
| 76 */ | 76 */ |
| 77 void setGammaCorrect(bool gammaCorrect) { | 77 void setGammaCorrect(bool gammaCorrect) { |
| 78 setDisableOutputConversionToSRGB(!gammaCorrect); | 78 setDisableOutputConversionToSRGB(!gammaCorrect); |
| 79 setAllowSRGBInputs(gammaCorrect); | 79 setAllowSRGBInputs(gammaCorrect); |
| 80 } | 80 } |
| 81 | 81 |
| 82 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { | 82 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { |
| 83 fXPFactory.reset(SkSafeRef(xpFactory)); | 83 fXPFactory.reset(SkSafeRef(xpFactory)); |
| 84 return xpFactory; | 84 return xpFactory; |
| 85 } | 85 } |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 SkSTArray<2, const GrFragmentProcessor*, true> fCoverageFragmentProcessors; | 179 SkSTArray<2, const GrFragmentProcessor*, true> fCoverageFragmentProcessors; |
| 180 | 180 |
| 181 bool fAntiAlias; | 181 bool fAntiAlias; |
| 182 bool fDisableOutputConversionToSR
GB; | 182 bool fDisableOutputConversionToSR
GB; |
| 183 bool fAllowSRGBInputs; | 183 bool fAllowSRGBInputs; |
| 184 | 184 |
| 185 GrColor fColor; | 185 GrColor fColor; |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 #endif | 188 #endif |
| OLD | NEW |