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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 * or smooth-line rendering if a line primitive is drawn and line smooth
ing is supported by | 284 * or smooth-line rendering if a line primitive is drawn and line smooth
ing is supported by |
285 * the 3D API. | 285 * the 3D API. |
286 */ | 286 */ |
287 kHWAntialias_Flag = 0x01, | 287 kHWAntialias_Flag = 0x01, |
288 | 288 |
289 /** | 289 /** |
290 * Modifies the vertex shader so that vertices will be positioned at pix
el centers. | 290 * Modifies the vertex shader so that vertices will be positioned at pix
el centers. |
291 */ | 291 */ |
292 kSnapVerticesToPixelCenters_Flag = 0x02, | 292 kSnapVerticesToPixelCenters_Flag = 0x02, |
293 | 293 |
294 kLast_Flag = kSnapVerticesToPixelCenters_Flag, | 294 /** |
| 295 * Adds built-in information about sample locations to the fragment shad
er. Requires HW |
| 296 * antialias and support for sample locations in the caps. |
| 297 */ |
| 298 kSampleLocations_Flag = 0x04, |
| 299 |
| 300 kLast_Flag = kSampleLocations_Flag, |
295 }; | 301 }; |
296 | 302 |
297 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } | 303 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } |
298 bool snapVerticesToPixelCenters() const { | 304 bool snapVerticesToPixelCenters() const { |
299 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } | 305 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } |
| 306 bool hasSampleLocations() const { return SkToBool(fFlags & kSampleLocations_
Flag); } |
300 | 307 |
301 /** | 308 /** |
302 * Enable render state settings. | 309 * Enable render state settings. |
303 * | 310 * |
304 * @param flags bitfield of Flags specifying the states to enable | 311 * @param flags bitfield of Flags specifying the states to enable |
305 */ | 312 */ |
306 void enableState(uint32_t flags) { fFlags |= flags; } | 313 void enableState(uint32_t flags) { fFlags |= flags; } |
307 | 314 |
308 /** | 315 /** |
309 * Disable render state settings. | 316 * Disable render state settings. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 386 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
380 FragmentProcessorArray fColorFragmentProcessors; | 387 FragmentProcessorArray fColorFragmentProcessors; |
381 FragmentProcessorArray fCoverageFragmentProcessors; | 388 FragmentProcessorArray fCoverageFragmentProcessors; |
382 GrClip fClip; | 389 GrClip fClip; |
383 | 390 |
384 friend class GrPipeline; | 391 friend class GrPipeline; |
385 friend class GrDrawTarget; | 392 friend class GrDrawTarget; |
386 }; | 393 }; |
387 | 394 |
388 #endif | 395 #endif |
OLD | NEW |