OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrPipelineBuilder_DEFINED | 8 #ifndef GrPipelineBuilder_DEFINED |
9 #define GrPipelineBuilder_DEFINED | 9 #define GrPipelineBuilder_DEFINED |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 /** | 212 /** |
213 * Suppress linear -> sRGB conversion when rendering to sRGB render targ
ets. | 213 * Suppress linear -> sRGB conversion when rendering to sRGB render targ
ets. |
214 */ | 214 */ |
215 kDisableOutputConversionToSRGB_Flag = 0x04, | 215 kDisableOutputConversionToSRGB_Flag = 0x04, |
216 | 216 |
217 /** | 217 /** |
218 * Allow sRGB -> linear conversion when reading from sRGB inputs. | 218 * Allow sRGB -> linear conversion when reading from sRGB inputs. |
219 */ | 219 */ |
220 kAllowSRGBInputs_Flag = 0x08, | 220 kAllowSRGBInputs_Flag = 0x08, |
221 | 221 |
222 kLast_Flag = kAllowSRGBInputs_Flag, | 222 /** |
| 223 * Signals that one or more FPs need access to the distance vector field
to the nearest |
| 224 * edge |
| 225 */ |
| 226 kUsesDistanceVectorField_Flag = 0x10, |
| 227 |
| 228 |
| 229 kLast_Flag = kUsesDistanceVectorField_Flag, |
223 }; | 230 }; |
224 | 231 |
225 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } | 232 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } |
226 bool snapVerticesToPixelCenters() const { | 233 bool snapVerticesToPixelCenters() const { |
227 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } | 234 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } |
228 bool getDisableOutputConversionToSRGB() const { | 235 bool getDisableOutputConversionToSRGB() const { |
229 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); } | 236 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); } |
230 bool getAllowSRGBInputs() const { | 237 bool getAllowSRGBInputs() const { |
231 return SkToBool(fFlags & kAllowSRGBInputs_Flag); } | 238 return SkToBool(fFlags & kAllowSRGBInputs_Flag); } |
| 239 bool getUsesDistanceVectorField() const { |
| 240 return SkToBool(fFlags & kUsesDistanceVectorField_Flag); } |
232 | 241 |
233 /** | 242 /** |
234 * Enable render state settings. | 243 * Enable render state settings. |
235 * | 244 * |
236 * @param flags bitfield of Flags specifying the states to enable | 245 * @param flags bitfield of Flags specifying the states to enable |
237 */ | 246 */ |
238 void enableState(uint32_t flags) { fFlags |= flags; } | 247 void enableState(uint32_t flags) { fFlags |= flags; } |
239 | 248 |
240 /** | 249 /** |
241 * Disable render state settings. | 250 * Disable render state settings. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 DrawFace fDrawFace; | 315 DrawFace fDrawFace; |
307 mutable sk_sp<GrXPFactory> fXPFactory; | 316 mutable sk_sp<GrXPFactory> fXPFactory; |
308 FragmentProcessorArray fColorFragmentProcessors; | 317 FragmentProcessorArray fColorFragmentProcessors; |
309 FragmentProcessorArray fCoverageFragmentProcessors; | 318 FragmentProcessorArray fCoverageFragmentProcessors; |
310 | 319 |
311 friend class GrPipeline; | 320 friend class GrPipeline; |
312 friend class GrDrawTarget; | 321 friend class GrDrawTarget; |
313 }; | 322 }; |
314 | 323 |
315 #endif | 324 #endif |
OLD | NEW |