Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: include/gpu/GrPaint.h

Issue 1889453002: Tweak distance field path renderer behavior in gamma-correct mode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebased, plumbed gamma-correctness via DrawPathArgs, fixed typos from most recent change Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkSurfaceProps.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/core/SkSurfaceProps.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698