From 55397fc328afa661889e11bfac71617667bd3b69 Mon Sep 17 00:00:00 2001 From: "piman@google.com" Date: Fri, 22 Apr 2011 04:09:33 +0000 Subject: 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 --- gpu/command_buffer/service/gles2_cmd_decoder.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gpu') 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(c.target); GLint level = static_cast(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(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; -- cgit v1.1