gpu: Add traces to Produce/Consume texture.
Currently consume is expensive. Also, we currently
have no other way of detecting compositor frames
being produced/consumed in the GPU process.
BUG=220561
NOTRY=true
No try since the aura failure isn't related.
Review URL: https://chromiumcodereview.appspot.com/12888005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189962 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index c427a9e..95636b2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -9965,6 +9965,10 @@
void GLES2DecoderImpl::DoProduceTextureCHROMIUM(GLenum target,
const GLbyte* mailbox) {
+ TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoProduceTextureCHROMIUM",
+ "context", GetLogPrefix(),
+ "mailbox[0]", static_cast<unsigned char>(mailbox[0]));
+
Texture* texture = GetTextureInfoForTarget(target);
if (!texture) {
LOCAL_SET_GL_ERROR(
@@ -10000,6 +10004,10 @@
void GLES2DecoderImpl::DoConsumeTextureCHROMIUM(GLenum target,
const GLbyte* mailbox) {
+ TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoConsumeTextureCHROMIUM",
+ "context", GetLogPrefix(),
+ "mailbox[0]", static_cast<unsigned char>(mailbox[0]));
+
Texture* texture = GetTextureInfoForTarget(target);
if (!texture) {
LOCAL_SET_GL_ERROR(