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 a built-in fragment shader array that contains the pipeline's sa mple locations. | |
296 */ | |
297 kSampleLocations_Flag = 0x04, | |
bsalomon
2016/02/22 20:28:26
Where/how will this get set?
Chris Dalton
2016/02/22 21:19:11
I envision it being set by the code that sets up t
| |
298 | |
299 kLast_Flag = kSampleLocations_Flag, | |
295 }; | 300 }; |
296 | 301 |
297 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } | 302 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } |
298 bool snapVerticesToPixelCenters() const { | 303 bool snapVerticesToPixelCenters() const { |
299 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } | 304 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } |
305 bool hasSampleLocations() const { return SkToBool(fFlags & kSampleLocations_ Flag); } | |
300 | 306 |
301 /** | 307 /** |
302 * Enable render state settings. | 308 * Enable render state settings. |
303 * | 309 * |
304 * @param flags bitfield of Flags specifying the states to enable | 310 * @param flags bitfield of Flags specifying the states to enable |
305 */ | 311 */ |
306 void enableState(uint32_t flags) { fFlags |= flags; } | 312 void enableState(uint32_t flags) { fFlags |= flags; } |
307 | 313 |
308 /** | 314 /** |
309 * Disable render state settings. | 315 * Disable render state settings. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 385 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
380 FragmentProcessorArray fColorFragmentProcessors; | 386 FragmentProcessorArray fColorFragmentProcessors; |
381 FragmentProcessorArray fCoverageFragmentProcessors; | 387 FragmentProcessorArray fCoverageFragmentProcessors; |
382 GrClip fClip; | 388 GrClip fClip; |
383 | 389 |
384 friend class GrPipeline; | 390 friend class GrPipeline; |
385 friend class GrDrawTarget; | 391 friend class GrDrawTarget; |
386 }; | 392 }; |
387 | 393 |
388 #endif | 394 #endif |
OLD | NEW |