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

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: Update for merge conflict 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
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 kDrawTriangles_DrawType, 320 kDrawTriangles_DrawType,
321 kStencilPath_DrawType, 321 kStencilPath_DrawType,
322 kDrawPath_DrawType, 322 kDrawPath_DrawType,
323 kDrawPaths_DrawType, 323 kDrawPaths_DrawType,
324 }; 324 };
325 325
326 static bool IsPathRenderingDrawType(DrawType type) { 326 static bool IsPathRenderingDrawType(DrawType type) {
327 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; 327 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type;
328 } 328 }
329 329
330 GrContext::GPUStats* gpuStats() { return &fGPUStats; }
331
330 protected: 332 protected:
331 DrawType PrimTypeToDrawType(GrPrimitiveType type) { 333 DrawType PrimTypeToDrawType(GrPrimitiveType type) {
332 switch (type) { 334 switch (type) {
333 case kTriangles_GrPrimitiveType: 335 case kTriangles_GrPrimitiveType:
334 case kTriangleStrip_GrPrimitiveType: 336 case kTriangleStrip_GrPrimitiveType:
335 case kTriangleFan_GrPrimitiveType: 337 case kTriangleFan_GrPrimitiveType:
336 return kDrawTriangles_DrawType; 338 return kDrawTriangles_DrawType;
337 case kPoints_GrPrimitiveType: 339 case kPoints_GrPrimitiveType:
338 return kDrawPoints_DrawType; 340 return kDrawPoints_DrawType;
339 case kLines_GrPrimitiveType: 341 case kLines_GrPrimitiveType:
(...skipping 17 matching lines...) Expand all
357 GrStencilFunc func); 359 GrStencilFunc func);
358 static void ConvertStencilFuncAndMask(GrStencilFunc func, 360 static void ConvertStencilFuncAndMask(GrStencilFunc func,
359 bool clipInStencil, 361 bool clipInStencil,
360 unsigned int clipBit, 362 unsigned int clipBit,
361 unsigned int userBits, 363 unsigned int userBits,
362 unsigned int* ref, 364 unsigned int* ref,
363 unsigned int* mask); 365 unsigned int* mask);
364 366
365 GrClipMaskManager fClipMaskManager; 367 GrClipMaskManager fClipMaskManager;
366 368
369 GrContext::GPUStats fGPUStats;
370
367 struct GeometryPoolState { 371 struct GeometryPoolState {
368 const GrVertexBuffer* fPoolVertexBuffer; 372 const GrVertexBuffer* fPoolVertexBuffer;
369 int fPoolStartVertex; 373 int fPoolStartVertex;
370 374
371 const GrIndexBuffer* fPoolIndexBuffer; 375 const GrIndexBuffer* fPoolIndexBuffer;
372 int fPoolStartIndex; 376 int fPoolStartIndex;
373 }; 377 };
374 const GeometryPoolState& getGeomPoolState() { 378 const GeometryPoolState& getGeomPoolState() {
375 return fGeomPoolStateStack.back(); 379 return fGeomPoolStateStack.back();
376 } 380 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // counts number of uses of vertex/index pool in the geometry stack 509 // counts number of uses of vertex/index pool in the geometry stack
506 int fVertexP oolUseCnt; 510 int fVertexP oolUseCnt;
507 int fIndexPo olUseCnt; 511 int fIndexPo olUseCnt;
508 // these are mutable so they can be created on-demand 512 // these are mutable so they can be created on-demand
509 mutable GrIndexBuffer* fQuadInd exBuffer; 513 mutable GrIndexBuffer* fQuadInd exBuffer;
510 514
511 typedef GrDrawTarget INHERITED; 515 typedef GrDrawTarget INHERITED;
512 }; 516 };
513 517
514 #endif 518 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698