Add number of draws to GrGpu stats
BUG=skia: Review URL: https://codereview.chromium.org/1333543002
This commit is contained in:
parent
00c3252bb9
commit
87a5c9fa0f
@ -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
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user