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

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: Created 9 years, 3 months 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6548 matching lines...) Expand 10 before | Expand all | Expand 10 after
6559 } 6559 }
6560 // TODO(gman): call glShaderBinary 6560 // TODO(gman): call glShaderBinary
6561 return error::kNoError; 6561 return error::kNoError;
6562 #endif 6562 #endif
6563 } 6563 }
6564 6564
6565 error::Error GLES2DecoderImpl::HandleSwapBuffers( 6565 error::Error GLES2DecoderImpl::HandleSwapBuffers(
6566 uint32 immediate_data_size, const gles2::SwapBuffers& c) { 6566 uint32 immediate_data_size, const gles2::SwapBuffers& c) {
6567 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); 6567 bool is_offscreen = !!offscreen_target_frame_buffer_.get();
6568 int this_frame_number = frame_number_++; 6568 int this_frame_number = frame_number_++;
6569 // This event is used by frame_rate_tests:
6570 TRACE_EVENT_INSTANT1("test_frame_rate_tests", "SwapBuffers", "is_GPU",
6571 gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL ||
6572 gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2);
nduca 2011/10/11 20:37:56 Is the idea here to distinguish between Mesa and "
jbates 2011/10/11 20:53:23 How about I add a ToString for GLImplementation an
6569 TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers", 6573 TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers",
6570 "offscreen", is_offscreen, 6574 "offscreen", is_offscreen,
6571 "frame", this_frame_number); 6575 "frame", this_frame_number);
6572 // If offscreen then don't actually SwapBuffers to the display. Just copy 6576 // If offscreen then don't actually SwapBuffers to the display. Just copy
6573 // the rendered frame to another frame buffer. 6577 // the rendered frame to another frame buffer.
6574 if (is_offscreen) { 6578 if (is_offscreen) {
6575 if (offscreen_size_ != offscreen_saved_color_texture_->size()) { 6579 if (offscreen_size_ != offscreen_saved_color_texture_->size()) {
6576 // Workaround for NVIDIA driver bug on OS X; crbug.com/89557, 6580 // Workaround for NVIDIA driver bug on OS X; crbug.com/89557,
6577 // crbug.com/94163. TODO(kbr): figure out reproduction so Apple will 6581 // crbug.com/94163. TODO(kbr): figure out reproduction so Apple will
6578 // fix this. 6582 // fix this.
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 return false; 6874 return false;
6871 } 6875 }
6872 6876
6873 // Include the auto-generated part of this file. We split this because it means 6877 // Include the auto-generated part of this file. We split this because it means
6874 // we can easily edit the non-auto generated parts right here in this file 6878 // we can easily edit the non-auto generated parts right here in this file
6875 // instead of having to edit some template or the code generator. 6879 // instead of having to edit some template or the code generator.
6876 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 6880 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
6877 6881
6878 } // namespace gles2 6882 } // namespace gles2
6879 } // namespace gpu 6883 } // namespace gpu
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698