diff options
author | joshualitt <joshualitt@chromium.org> | 2015-09-08 13:42:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-08 13:42:05 -0700 |
commit | 87a5c9fa0ff6fdf5225df53666798a2d513ade6d (patch) | |
tree | ddc5cc78ca3ef85d0c633252040c2517df8eba62 /src/gpu | |
parent | 00c3252bb9bcb669bea6e9e0d06e6a3d8ba0d593 (diff) |
Add number of draws to GrGpu stats
BUG=skia:
Review URL: https://codereview.chromium.org/1333543002
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrGpu.h | 4 | ||||
-rw-r--r-- | src/gpu/GrTest.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index 08837ccde8..ba9e85b54f 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -331,6 +331,7 @@ public: fTextureCreates = 0; fTextureUploads = 0; fStencilAttachmentCreates = 0; + fNumDraws = 0; } int renderTargetBinds() const { return fRenderTargetBinds; } @@ -342,6 +343,7 @@ public: int textureUploads() const { return fTextureUploads; } void incTextureUploads() { fTextureUploads++; } void incStencilAttachmentCreates() { fStencilAttachmentCreates++; } + void incNumDraws() { fNumDraws++; } void dump(SkString*); private: @@ -350,6 +352,7 @@ public: int fTextureCreates; int fTextureUploads; int fStencilAttachmentCreates; + int fNumDraws; #else void dump(SkString*) {}; void incRenderTargetBinds() {} @@ -357,6 +360,7 @@ public: void incTextureCreates() {} void incTextureUploads() {} void incStencilAttachmentCreates() {} + void incNumDraws() {} #endif }; diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp index a111ee5185..0852b6dd94 100644 --- a/src/gpu/GrTest.cpp +++ b/src/gpu/GrTest.cpp @@ -103,6 +103,7 @@ void GrGpu::Stats::dump(SkString* out) { out->appendf("Textures Created: %d\n", fTextureCreates); out->appendf("Texture Uploads: %d\n", fTextureUploads); out->appendf("Stencil Buffer Creates: %d\n", fStencilAttachmentCreates); + out->appendf("Number of draws: %d\n", fNumDraws); } #endif |