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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 10378112: Make latency tests measure until the end of swap buffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/browser/renderer_host/render_widget_host_impl.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool GpuCommandBufferStub::HasUnprocessedCommands() { 174 bool GpuCommandBufferStub::HasUnprocessedCommands() {
175 if (command_buffer_.get()) { 175 if (command_buffer_.get()) {
176 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 176 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
177 return state.put_offset != state.get_offset && 177 return state.put_offset != state.get_offset &&
178 !gpu::error::IsError(state.error); 178 !gpu::error::IsError(state.error);
179 } 179 }
180 return false; 180 return false;
181 } 181 }
182 182
183 void GpuCommandBufferStub::OnEcho(const IPC::Message& message) { 183 void GpuCommandBufferStub::OnEcho(const IPC::Message& message) {
184 // For latency_tests.cc:
185 UNSHIPPED_TRACE_EVENT_INSTANT0("test_gpu", "CompositorSwapBuffersComplete");
184 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho"); 186 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho");
185 Send(new IPC::Message(message)); 187 Send(new IPC::Message(message));
186 } 188 }
187 189
188 void GpuCommandBufferStub::DelayEcho(IPC::Message* message) { 190 void GpuCommandBufferStub::DelayEcho(IPC::Message* message) {
189 delayed_echos_.push_back(message); 191 delayed_echos_.push_back(message);
190 } 192 }
191 193
192 void GpuCommandBufferStub::OnReschedule() { 194 void GpuCommandBufferStub::OnReschedule() {
193 while (!delayed_echos_.empty()) { 195 while (!delayed_echos_.empty()) {
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 658 }
657 659
658 void GpuCommandBufferStub::SetMemoryAllocation( 660 void GpuCommandBufferStub::SetMemoryAllocation(
659 const GpuMemoryAllocation& allocation) { 661 const GpuMemoryAllocation& allocation) {
660 allocation_ = allocation; 662 allocation_ = allocation;
661 663
662 SendMemoryAllocationToProxy(allocation); 664 SendMemoryAllocationToProxy(allocation);
663 } 665 }
664 666
665 #endif // defined(ENABLE_GPU) 667 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698