Add number of draws to GrGpu stats

BUG=skia:

Review URL: https://codereview.chromium.org/1333543002
This commit is contained in:
joshualitt 2015-09-08 13:42:05 -07:00 committed by Commit bot
parent 00c3252bb9
commit 87a5c9fa0f
2 changed files with 5 additions and 0 deletions

View File

@ -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
};

View File

@ -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