Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 7982007: add "did it run on GPU" check to frame_rate_tests.cc using AutomationProxy tracing feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added templated TraceEvent::GetArgAsIntType Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 6787 matching lines...) Expand 10 before | Expand all | Expand 10 after
6798 } 6798 }
6799 // TODO(gman): call glShaderBinary 6799 // TODO(gman): call glShaderBinary
6800 return error::kNoError; 6800 return error::kNoError;
6801 #endif 6801 #endif
6802 } 6802 }
6803 6803
6804 error::Error GLES2DecoderImpl::HandleSwapBuffers( 6804 error::Error GLES2DecoderImpl::HandleSwapBuffers(
6805 uint32 immediate_data_size, const gles2::SwapBuffers& c) { 6805 uint32 immediate_data_size, const gles2::SwapBuffers& c) {
6806 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); 6806 bool is_offscreen = !!offscreen_target_frame_buffer_.get();
6807 int this_frame_number = frame_number_++; 6807 int this_frame_number = frame_number_++;
6808 // This event is used by frame_rate_tests:
6809 TRACE_EVENT_INSTANT1("test_frame_rate_tests", "SwapBuffers",
6810 "GLImpl", static_cast<int>(gfx::GetGLImplementation()));
6808 TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers", 6811 TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers",
6809 "offscreen", is_offscreen, 6812 "offscreen", is_offscreen,
6810 "frame", this_frame_number); 6813 "frame", this_frame_number);
6811 // If offscreen then don't actually SwapBuffers to the display. Just copy 6814 // If offscreen then don't actually SwapBuffers to the display. Just copy
6812 // the rendered frame to another frame buffer. 6815 // the rendered frame to another frame buffer.
6813 if (is_offscreen) { 6816 if (is_offscreen) {
6814 if (offscreen_size_ != offscreen_saved_color_texture_->size()) { 6817 if (offscreen_size_ != offscreen_saved_color_texture_->size()) {
6815 // Workaround for NVIDIA driver bug on OS X; crbug.com/89557, 6818 // Workaround for NVIDIA driver bug on OS X; crbug.com/89557,
6816 // crbug.com/94163. TODO(kbr): figure out reproduction so Apple will 6819 // crbug.com/94163. TODO(kbr): figure out reproduction so Apple will
6817 // fix this. 6820 // fix this.
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
7206 return error::kNoError; 7209 return error::kNoError;
7207 } 7210 }
7208 7211
7209 // Include the auto-generated part of this file. We split this because it means 7212 // Include the auto-generated part of this file. We split this because it means
7210 // we can easily edit the non-auto generated parts right here in this file 7213 // we can easily edit the non-auto generated parts right here in this file
7211 // instead of having to edit some template or the code generator. 7214 // instead of having to edit some template or the code generator.
7212 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 7215 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
7213 7216
7214 } // namespace gles2 7217 } // namespace gles2
7215 } // namespace gpu 7218 } // namespace gpu
OLDNEW
« chrome/test/perf/frame_rate/frame_rate_tests.cc ('K') | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698