OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED |
9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED |
10 | 10 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 enum DrawType { | 348 enum DrawType { |
349 kDrawPoints_DrawType, | 349 kDrawPoints_DrawType, |
350 kDrawLines_DrawType, | 350 kDrawLines_DrawType, |
351 kDrawTriangles_DrawType, | 351 kDrawTriangles_DrawType, |
352 kStencilPath_DrawType, | 352 kStencilPath_DrawType, |
353 kDrawPath_DrawType, | 353 kDrawPath_DrawType, |
354 kDrawPaths_DrawType, | 354 kDrawPaths_DrawType, |
355 }; | 355 }; |
356 | 356 |
| 357 static bool IsPathRenderingDrawType(DrawType type) { |
| 358 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; |
| 359 } |
| 360 |
357 protected: | 361 protected: |
358 DrawType PrimTypeToDrawType(GrPrimitiveType type) { | 362 DrawType PrimTypeToDrawType(GrPrimitiveType type) { |
359 switch (type) { | 363 switch (type) { |
360 case kTriangles_GrPrimitiveType: | 364 case kTriangles_GrPrimitiveType: |
361 case kTriangleStrip_GrPrimitiveType: | 365 case kTriangleStrip_GrPrimitiveType: |
362 case kTriangleFan_GrPrimitiveType: | 366 case kTriangleFan_GrPrimitiveType: |
363 return kDrawTriangles_DrawType; | 367 return kDrawTriangles_DrawType; |
364 case kPoints_GrPrimitiveType: | 368 case kPoints_GrPrimitiveType: |
365 return kDrawPoints_DrawType; | 369 return kDrawPoints_DrawType; |
366 case kLines_GrPrimitiveType: | 370 case kLines_GrPrimitiveType: |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 // these are mutable so they can be created on-demand | 539 // these are mutable so they can be created on-demand |
536 mutable GrIndexBuffer* fQuadInd
exBuffer; | 540 mutable GrIndexBuffer* fQuadInd
exBuffer; |
537 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his | 541 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his |
538 // functionality to GrResourceCache. | 542 // functionality to GrResourceCache. |
539 ObjectList fObjectL
ist; | 543 ObjectList fObjectL
ist; |
540 | 544 |
541 typedef GrDrawTarget INHERITED; | 545 typedef GrDrawTarget INHERITED; |
542 }; | 546 }; |
543 | 547 |
544 #endif | 548 #endif |
OLD | NEW |