| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 enum DrawType { | 330 enum DrawType { |
| 331 kDrawPoints_DrawType, | 331 kDrawPoints_DrawType, |
| 332 kDrawLines_DrawType, | 332 kDrawLines_DrawType, |
| 333 kDrawTriangles_DrawType, | 333 kDrawTriangles_DrawType, |
| 334 kStencilPath_DrawType, | 334 kStencilPath_DrawType, |
| 335 kDrawPath_DrawType, | 335 kDrawPath_DrawType, |
| 336 kDrawPaths_DrawType, | 336 kDrawPaths_DrawType, |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 static bool IsPathRenderingDrawType(DrawType type) { |
| 340 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; |
| 341 } |
| 342 |
| 339 protected: | 343 protected: |
| 340 DrawType PrimTypeToDrawType(GrPrimitiveType type) { | 344 DrawType PrimTypeToDrawType(GrPrimitiveType type) { |
| 341 switch (type) { | 345 switch (type) { |
| 342 case kTriangles_GrPrimitiveType: | 346 case kTriangles_GrPrimitiveType: |
| 343 case kTriangleStrip_GrPrimitiveType: | 347 case kTriangleStrip_GrPrimitiveType: |
| 344 case kTriangleFan_GrPrimitiveType: | 348 case kTriangleFan_GrPrimitiveType: |
| 345 return kDrawTriangles_DrawType; | 349 return kDrawTriangles_DrawType; |
| 346 case kPoints_GrPrimitiveType: | 350 case kPoints_GrPrimitiveType: |
| 347 return kDrawPoints_DrawType; | 351 return kDrawPoints_DrawType; |
| 348 case kLines_GrPrimitiveType: | 352 case kLines_GrPrimitiveType: |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 // counts number of uses of vertex/index pool in the geometry stack | 517 // counts number of uses of vertex/index pool in the geometry stack |
| 514 int fVertexP
oolUseCnt; | 518 int fVertexP
oolUseCnt; |
| 515 int fIndexPo
olUseCnt; | 519 int fIndexPo
olUseCnt; |
| 516 // these are mutable so they can be created on-demand | 520 // these are mutable so they can be created on-demand |
| 517 mutable GrIndexBuffer* fQuadInd
exBuffer; | 521 mutable GrIndexBuffer* fQuadInd
exBuffer; |
| 518 | 522 |
| 519 typedef GrDrawTarget INHERITED; | 523 typedef GrDrawTarget INHERITED; |
| 520 }; | 524 }; |
| 521 | 525 |
| 522 #endif | 526 #endif |
| OLD | NEW |