summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 21:49:49 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 21:49:49 +0000
commit64ace85b13b3f68f0cc3b8e60e98297fd4fbf5aa (patch)
tree3b3fff4f5c13c5192e5bbf207111cf34c3e01c5e /gpu
parentcb5e507bf311305117bc727d94921e89c2dee7de (diff)
downloadchromium_src-64ace85b13b3f68f0cc3b8e60e98297fd4fbf5aa.zip
chromium_src-64ace85b13b3f68f0cc3b8e60e98297fd4fbf5aa.tar.gz
chromium_src-64ace85b13b3f68f0cc3b8e60e98297fd4fbf5aa.tar.bz2
Added more trace info to SwapBuffers, traced some functions in WebGraphicsContext3D. SwapBuffers now traces frame count for both offscreen and onscreen contexts. An offscreen bool is also traced.
BUG=none TEST=observe more trace info in SwapBuffers calls Review URL: http://codereview.chromium.org/7037042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 7c1c0e2..70e0847 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6333,10 +6333,14 @@ error::Error GLES2DecoderImpl::HandleShaderBinary(
error::Error GLES2DecoderImpl::HandleSwapBuffers(
uint32 immediate_data_size, const gles2::SwapBuffers& c) {
- TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleSwapBuffers");
+ bool is_offscreen = !!offscreen_target_frame_buffer_.get();
+ int this_frame_number = frame_number_++;
+ TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers",
+ "offscreen", is_offscreen,
+ "frame", this_frame_number);
// 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()) {
+ if (is_offscreen) {
ScopedGLErrorSuppressor suppressor(this);
// First check to see if a deferred offscreen render buffer resize is
@@ -6379,8 +6383,7 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers(
return error::kNoError;
}
} else {
- TRACE_EVENT1("gpu", "GLContext::SwapBuffers", "frame", frame_number_);
- frame_number_++;
+ TRACE_EVENT1("gpu", "GLContext::SwapBuffers", "frame", this_frame_number);
if (!context_->SwapBuffers()) {
LOG(ERROR) << "Context lost because SwapBuffers failed.";
return error::kLostContext;