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

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: merged 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 6990 matching lines...) Expand 10 before | Expand all | Expand 10 after
7001 } 7001 }
7002 // TODO(gman): call glShaderBinary 7002 // TODO(gman): call glShaderBinary
7003 return error::kNoError; 7003 return error::kNoError;
7004 #endif 7004 #endif
7005 } 7005 }
7006 7006
7007 error::Error GLES2DecoderImpl::HandleSwapBuffers( 7007 error::Error GLES2DecoderImpl::HandleSwapBuffers(
7008 uint32 immediate_data_size, const gles2::SwapBuffers& c) { 7008 uint32 immediate_data_size, const gles2::SwapBuffers& c) {
7009 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); 7009 bool is_offscreen = !!offscreen_target_frame_buffer_.get();
7010 int this_frame_number = frame_number_++; 7010 int this_frame_number = frame_number_++;
7011 // This event is used by frame_rate_tests:
7012 TRACE_EVENT_INSTANT1("test_frame_rate_tests", "SwapBuffers",
7013 "GLImpl", static_cast<int>(gfx::GetGLImplementation()));
7011 TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers", 7014 TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers",
7012 "offscreen", is_offscreen, 7015 "offscreen", is_offscreen,
7013 "frame", this_frame_number); 7016 "frame", this_frame_number);
7014 // If offscreen then don't actually SwapBuffers to the display. Just copy 7017 // If offscreen then don't actually SwapBuffers to the display. Just copy
7015 // the rendered frame to another frame buffer. 7018 // the rendered frame to another frame buffer.
7016 if (is_offscreen) { 7019 if (is_offscreen) {
7017 if (offscreen_size_ != offscreen_saved_color_texture_->size()) { 7020 if (offscreen_size_ != offscreen_saved_color_texture_->size()) {
7018 // Workaround for NVIDIA driver bug on OS X; crbug.com/89557, 7021 // Workaround for NVIDIA driver bug on OS X; crbug.com/89557,
7019 // crbug.com/94163. TODO(kbr): figure out reproduction so Apple will 7022 // crbug.com/94163. TODO(kbr): figure out reproduction so Apple will
7020 // fix this. 7023 // fix this.
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
7405 return error::kNoError; 7408 return error::kNoError;
7406 } 7409 }
7407 7410
7408 // Include the auto-generated part of this file. We split this because it means 7411 // Include the auto-generated part of this file. We split this because it means
7409 // we can easily edit the non-auto generated parts right here in this file 7412 // we can easily edit the non-auto generated parts right here in this file
7410 // instead of having to edit some template or the code generator. 7413 // instead of having to edit some template or the code generator.
7411 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 7414 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
7412 7415
7413 } // namespace gles2 7416 } // namespace gles2
7414 } // namespace gpu 7417 } // 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