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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 /** | 281 /** |
282 * Modifies the vertex shader so that vertices will be positioned at pix
el centers. | 282 * Modifies the vertex shader so that vertices will be positioned at pix
el centers. |
283 */ | 283 */ |
284 kSnapVerticesToPixelCenters_Flag = 0x02, | 284 kSnapVerticesToPixelCenters_Flag = 0x02, |
285 | 285 |
286 /** | 286 /** |
287 * Suppress linear -> sRGB conversion when rendering to sRGB render targ
ets. | 287 * Suppress linear -> sRGB conversion when rendering to sRGB render targ
ets. |
288 */ | 288 */ |
289 kDisableOutputConversionToSRGB_Flag = 0x04, | 289 kDisableOutputConversionToSRGB_Flag = 0x04, |
290 | 290 |
291 kLast_Flag = kDisableOutputConversionToSRGB_Flag, | 291 /** |
| 292 * Allow sRGB -> linear conversion when reading from sRGB inputs. |
| 293 */ |
| 294 kAllowSRGBInputs_Flag = 0x08, |
| 295 |
| 296 kLast_Flag = kAllowSRGBInputs_Flag, |
292 }; | 297 }; |
293 | 298 |
294 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } | 299 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } |
295 bool snapVerticesToPixelCenters() const { | 300 bool snapVerticesToPixelCenters() const { |
296 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } | 301 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } |
297 bool getDisableOutputConversionToSRGB() const { | 302 bool getDisableOutputConversionToSRGB() const { |
298 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); } | 303 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); } |
| 304 bool getAllowSRGBInputs() const { |
| 305 return SkToBool(fFlags & kAllowSRGBInputs_Flag); } |
299 | 306 |
300 /** | 307 /** |
301 * Enable render state settings. | 308 * Enable render state settings. |
302 * | 309 * |
303 * @param flags bitfield of Flags specifying the states to enable | 310 * @param flags bitfield of Flags specifying the states to enable |
304 */ | 311 */ |
305 void enableState(uint32_t flags) { fFlags |= flags; } | 312 void enableState(uint32_t flags) { fFlags |= flags; } |
306 | 313 |
307 /** | 314 /** |
308 * Disable render state settings. | 315 * Disable render state settings. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 385 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
379 FragmentProcessorArray fColorFragmentProcessors; | 386 FragmentProcessorArray fColorFragmentProcessors; |
380 FragmentProcessorArray fCoverageFragmentProcessors; | 387 FragmentProcessorArray fCoverageFragmentProcessors; |
381 GrClip fClip; | 388 GrClip fClip; |
382 | 389 |
383 friend class GrPipeline; | 390 friend class GrPipeline; |
384 friend class GrDrawTarget; | 391 friend class GrDrawTarget; |
385 }; | 392 }; |
386 | 393 |
387 #endif | 394 #endif |
OLD | NEW |