| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 * or smooth-line rendering if a line primitive is drawn and line smooth
ing is supported by | 276 * or smooth-line rendering if a line primitive is drawn and line smooth
ing is supported by |
| 277 * the 3D API. | 277 * the 3D API. |
| 278 */ | 278 */ |
| 279 kHWAntialias_Flag = 0x01, | 279 kHWAntialias_Flag = 0x01, |
| 280 | 280 |
| 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 kLast_Flag = kSnapVerticesToPixelCenters_Flag, | 286 /** |
| 287 * Suppress linear -> sRGB conversion when rendering to sRGB render targ
ets. |
| 288 */ |
| 289 kDisableOutputConversionToSRGB_Flag = 0x04, |
| 290 |
| 291 kLast_Flag = kDisableOutputConversionToSRGB_Flag, |
| 287 }; | 292 }; |
| 288 | 293 |
| 289 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } | 294 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } |
| 290 bool snapVerticesToPixelCenters() const { | 295 bool snapVerticesToPixelCenters() const { |
| 291 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } | 296 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } |
| 297 bool getDisableOutputConversionToSRGB() const { |
| 298 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); } |
| 292 | 299 |
| 293 /** | 300 /** |
| 294 * Enable render state settings. | 301 * Enable render state settings. |
| 295 * | 302 * |
| 296 * @param flags bitfield of Flags specifying the states to enable | 303 * @param flags bitfield of Flags specifying the states to enable |
| 297 */ | 304 */ |
| 298 void enableState(uint32_t flags) { fFlags |= flags; } | 305 void enableState(uint32_t flags) { fFlags |= flags; } |
| 299 | 306 |
| 300 /** | 307 /** |
| 301 * Disable render state settings. | 308 * Disable render state settings. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 378 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
| 372 FragmentProcessorArray fColorFragmentProcessors; | 379 FragmentProcessorArray fColorFragmentProcessors; |
| 373 FragmentProcessorArray fCoverageFragmentProcessors; | 380 FragmentProcessorArray fCoverageFragmentProcessors; |
| 374 GrClip fClip; | 381 GrClip fClip; |
| 375 | 382 |
| 376 friend class GrPipeline; | 383 friend class GrPipeline; |
| 377 friend class GrDrawTarget; | 384 friend class GrDrawTarget; |
| 378 }; | 385 }; |
| 379 | 386 |
| 380 #endif | 387 #endif |
| OLD | NEW |