| 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 |
| 11 #include "GrDrawTarget.h" | 11 #include "GrDrawTarget.h" |
| 12 #include "GrProgramDesc.h" |
| 12 #include "GrClipMaskManager.h" | 13 #include "GrClipMaskManager.h" |
| 13 #include "GrPathRendering.h" | 14 #include "GrPathRendering.h" |
| 14 #include "SkPath.h" | 15 #include "SkPath.h" |
| 15 | 16 |
| 16 class GrContext; | 17 class GrContext; |
| 17 class GrIndexBufferAllocPool; | 18 class GrIndexBufferAllocPool; |
| 18 class GrPath; | 19 class GrPath; |
| 19 class GrPathRange; | 20 class GrPathRange; |
| 20 class GrPathRenderer; | 21 class GrPathRenderer; |
| 21 class GrPathRendererChain; | 22 class GrPathRendererChain; |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 kDrawPath_DrawType, | 342 kDrawPath_DrawType, |
| 342 kDrawPaths_DrawType, | 343 kDrawPaths_DrawType, |
| 343 }; | 344 }; |
| 344 | 345 |
| 345 static bool IsPathRenderingDrawType(DrawType type) { | 346 static bool IsPathRenderingDrawType(DrawType type) { |
| 346 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; | 347 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; |
| 347 } | 348 } |
| 348 | 349 |
| 349 GrContext::GPUStats* gpuStats() { return &fGPUStats; } | 350 GrContext::GPUStats* gpuStats() { return &fGPUStats; } |
| 350 | 351 |
| 352 virtual void buildProgramDesc(const GrOptDrawState*, |
| 353 const GrProgramDesc::DescInfo&, |
| 354 GrGpu::DrawType, |
| 355 const GrDeviceCoordTexture* dstCopy, |
| 356 GrProgramDesc*) = 0; |
| 357 |
| 351 protected: | 358 protected: |
| 352 DrawType PrimTypeToDrawType(GrPrimitiveType type) { | 359 DrawType PrimTypeToDrawType(GrPrimitiveType type) { |
| 353 switch (type) { | 360 switch (type) { |
| 354 case kTriangles_GrPrimitiveType: | 361 case kTriangles_GrPrimitiveType: |
| 355 case kTriangleStrip_GrPrimitiveType: | 362 case kTriangleStrip_GrPrimitiveType: |
| 356 case kTriangleFan_GrPrimitiveType: | 363 case kTriangleFan_GrPrimitiveType: |
| 357 return kDrawTriangles_DrawType; | 364 return kDrawTriangles_DrawType; |
| 358 case kPoints_GrPrimitiveType: | 365 case kPoints_GrPrimitiveType: |
| 359 return kDrawPoints_DrawType; | 366 return kDrawPoints_DrawType; |
| 360 case kLines_GrPrimitiveType: | 367 case kLines_GrPrimitiveType: |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 // counts number of uses of vertex/index pool in the geometry stack | 535 // counts number of uses of vertex/index pool in the geometry stack |
| 529 int fVertexP
oolUseCnt; | 536 int fVertexP
oolUseCnt; |
| 530 int fIndexPo
olUseCnt; | 537 int fIndexPo
olUseCnt; |
| 531 // these are mutable so they can be created on-demand | 538 // these are mutable so they can be created on-demand |
| 532 mutable GrIndexBuffer* fQuadInd
exBuffer; | 539 mutable GrIndexBuffer* fQuadInd
exBuffer; |
| 533 | 540 |
| 534 typedef GrDrawTarget INHERITED; | 541 typedef GrDrawTarget INHERITED; |
| 535 }; | 542 }; |
| 536 | 543 |
| 537 #endif | 544 #endif |
| OLD | NEW |