Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Side by Side Diff: src/gpu/GrGpu.h

Issue 553583008: Add counting of some GL calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix some indents Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | src/gpu/gl/GrGpuGL.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698