diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 04:09:33 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 04:09:33 +0000 |
commit | 55397fc328afa661889e11bfac71617667bd3b69 (patch) | |
tree | b7e849ec18e1c2f8b6cd54e0389143a8d4980758 /gpu | |
parent | af45ec0ce13d05b2a71b55a00dedfae470bfaba6 (diff) | |
download | chromium_src-55397fc328afa661889e11bfac71617667bd3b69.zip chromium_src-55397fc328afa661889e11bfac71617667bd3b69.tar.gz chromium_src-55397fc328afa661889e11bfac71617667bd3b69.tar.bz2 |
gpu: Add traces for some gl calls that can be slow
BUG=none
TEST=about:gpu
Review URL: http://codereview.chromium.org/6897001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 65b2e56..d7dccf2 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -5588,6 +5588,7 @@ error::Error GLES2DecoderImpl::DoTexImage2D( error::Error GLES2DecoderImpl::HandleTexImage2D( uint32 immediate_data_size, const gles2::TexImage2D& c) { + GPU_TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleTexImage2D"); tex_image_2d_failed_ = true; GLenum target = static_cast<GLenum>(c.target); GLint level = static_cast<GLint>(c.level); @@ -5901,6 +5902,7 @@ void GLES2DecoderImpl::DoTexSubImage2D( error::Error GLES2DecoderImpl::HandleTexSubImage2D( uint32 immediate_data_size, const gles2::TexSubImage2D& c) { + GPU_TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleTexSubImage2D"); GLboolean internal = static_cast<GLboolean>(c.internal); if (internal == GL_TRUE && tex_image_2d_failed_) return error::kNoError; @@ -6324,6 +6326,7 @@ error::Error GLES2DecoderImpl::HandleShaderBinary( error::Error GLES2DecoderImpl::HandleSwapBuffers( uint32 immediate_data_size, const gles2::SwapBuffers& c) { + GPU_TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleSwapBuffers"); // If offscreen then don't actually SwapBuffers to the display. Just copy // the rendered frame to another frame buffer. if (offscreen_target_frame_buffer_.get()) { @@ -6369,6 +6372,7 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers( return error::kNoError; } } else { + GPU_TRACE_EVENT0("gpu", "GLContext::SwapBuffers"); if (!context_->SwapBuffers()) { LOG(ERROR) << "Context lost because SwapBuffers failed."; return error::kLostContext; |