Chromium Code Reviews| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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) { | 339 static bool IsPathRenderingDrawType(DrawType type) { |
| 340 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; | 340 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; |
| 341 } | 341 } |
| 342 | 342 |
| 343 #if GR_GPU_STATS | |
| 344 virtual const GrContext::GPUStats& gpuStats() const = 0; | |
|
bsalomon
2014/09/17 18:50:16
Why does this have to be virtual?
| |
| 345 #endif | |
| 346 | |
| 343 protected: | 347 protected: |
| 344 DrawType PrimTypeToDrawType(GrPrimitiveType type) { | 348 DrawType PrimTypeToDrawType(GrPrimitiveType type) { |
| 345 switch (type) { | 349 switch (type) { |
| 346 case kTriangles_GrPrimitiveType: | 350 case kTriangles_GrPrimitiveType: |
| 347 case kTriangleStrip_GrPrimitiveType: | 351 case kTriangleStrip_GrPrimitiveType: |
| 348 case kTriangleFan_GrPrimitiveType: | 352 case kTriangleFan_GrPrimitiveType: |
| 349 return kDrawTriangles_DrawType; | 353 return kDrawTriangles_DrawType; |
| 350 case kPoints_GrPrimitiveType: | 354 case kPoints_GrPrimitiveType: |
| 351 return kDrawPoints_DrawType; | 355 return kDrawPoints_DrawType; |
| 352 case kLines_GrPrimitiveType: | 356 case kLines_GrPrimitiveType: |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 518 // counts number of uses of vertex/index pool in the geometry stack | 522 // counts number of uses of vertex/index pool in the geometry stack |
| 519 int fVertexP oolUseCnt; | 523 int fVertexP oolUseCnt; |
| 520 int fIndexPo olUseCnt; | 524 int fIndexPo olUseCnt; |
| 521 // these are mutable so they can be created on-demand | 525 // these are mutable so they can be created on-demand |
| 522 mutable GrIndexBuffer* fQuadInd exBuffer; | 526 mutable GrIndexBuffer* fQuadInd exBuffer; |
| 523 | 527 |
| 524 typedef GrDrawTarget INHERITED; | 528 typedef GrDrawTarget INHERITED; |
| 525 }; | 529 }; |
| 526 | 530 |
| 527 #endif | 531 #endif |
| OLD | NEW |