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

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

Issue 949953002: Add stencil buffer create tracking to GPU stats. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrClipMaskManager.h ('k') | src/gpu/GrTest.cpp » ('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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 class Stats { 351 class Stats {
352 public: 352 public:
353 #if GR_GPU_STATS 353 #if GR_GPU_STATS
354 Stats() { this->reset(); } 354 Stats() { this->reset(); }
355 355
356 void reset() { 356 void reset() {
357 fRenderTargetBinds = 0; 357 fRenderTargetBinds = 0;
358 fShaderCompilations = 0; 358 fShaderCompilations = 0;
359 fTextureCreates = 0; 359 fTextureCreates = 0;
360 fTextureUploads = 0; 360 fTextureUploads = 0;
361 fStencilBufferCreates = 0;
361 } 362 }
362 363
363 int renderTargetBinds() const { return fRenderTargetBinds; } 364 int renderTargetBinds() const { return fRenderTargetBinds; }
364 void incRenderTargetBinds() { fRenderTargetBinds++; } 365 void incRenderTargetBinds() { fRenderTargetBinds++; }
365 int shaderCompilations() const { return fShaderCompilations; } 366 int shaderCompilations() const { return fShaderCompilations; }
366 void incShaderCompilations() { fShaderCompilations++; } 367 void incShaderCompilations() { fShaderCompilations++; }
367 int textureCreates() const { return fTextureCreates; } 368 int textureCreates() const { return fTextureCreates; }
368 void incTextureCreates() { fTextureCreates++; } 369 void incTextureCreates() { fTextureCreates++; }
369 int textureUploads() const { return fTextureUploads; } 370 int textureUploads() const { return fTextureUploads; }
370 void incTextureUploads() { fTextureUploads++; } 371 void incTextureUploads() { fTextureUploads++; }
372 void incStencilBufferCreates() { fStencilBufferCreates++; }
371 void dump(SkString*); 373 void dump(SkString*);
372 374
373 private: 375 private:
374 int fRenderTargetBinds; 376 int fRenderTargetBinds;
375 int fShaderCompilations; 377 int fShaderCompilations;
376 int fTextureCreates; 378 int fTextureCreates;
377 int fTextureUploads; 379 int fTextureUploads;
380 int fStencilBufferCreates;
378 #else 381 #else
379 void dump(SkString*) {}; 382 void dump(SkString*) {};
380 void incRenderTargetBinds() {} 383 void incRenderTargetBinds() {}
381 void incShaderCompilations() {} 384 void incShaderCompilations() {}
382 void incTextureCreates() {} 385 void incTextureCreates() {}
383 void incTextureUploads() {} 386 void incTextureUploads() {}
387 void incStencilBufferCreates() {}
384 #endif 388 #endif
385 }; 389 };
386 390
387 Stats* stats() { return &fStats; } 391 Stats* stats() { return &fStats; }
388 392
389 /** 393 /**
390 * Called at start and end of gpu trace marking 394 * Called at start and end of gpu trace marking
391 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th ese at the start 395 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th ese at the start
392 * and end of a code block respectively 396 * and end of a code block respectively
393 */ 397 */
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 int fGpuTrac eMarkerCount; 519 int fGpuTrac eMarkerCount;
516 GrTraceMarkerSet fActiveT raceMarkers; 520 GrTraceMarkerSet fActiveT raceMarkers;
517 GrTraceMarkerSet fStoredT raceMarkers; 521 GrTraceMarkerSet fStoredT raceMarkers;
518 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 522 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
519 GrContext* fContext ; 523 GrContext* fContext ;
520 524
521 typedef SkRefCnt INHERITED; 525 typedef SkRefCnt INHERITED;
522 }; 526 };
523 527
524 #endif 528 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698