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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
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 #include "content/common/gpu/client/command_buffer_proxy_impl.h" 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (last_put_offset_ == put_offset) 195 if (last_put_offset_ == put_offset)
196 return; 196 return;
197 197
198 last_put_offset_ = put_offset; 198 last_put_offset_ = put_offset;
199 199
200 Send(new GpuCommandBufferMsg_AsyncFlush(route_id_, 200 Send(new GpuCommandBufferMsg_AsyncFlush(route_id_,
201 put_offset, 201 put_offset,
202 ++flush_count_)); 202 ++flush_count_));
203 } 203 }
204 204
205 void CommandBufferProxyImpl::SetLatencyInfo(
206 const cc::LatencyInfo& latency_info) {
207 if (last_state_.error != gpu::error::kNoError)
208 return;
209 Send(new GpuCommandBufferMsg_SetLatencyInfo(route_id_, latency_info));
210 }
211
205 gpu::CommandBuffer::State CommandBufferProxyImpl::FlushSync( 212 gpu::CommandBuffer::State CommandBufferProxyImpl::FlushSync(
206 int32 put_offset, 213 int32 put_offset,
207 int32 last_known_get) { 214 int32 last_known_get) {
208 TRACE_EVENT1("gpu", "CommandBufferProxyImpl::FlushSync", "put_offset", 215 TRACE_EVENT1("gpu", "CommandBufferProxyImpl::FlushSync", "put_offset",
209 put_offset); 216 put_offset);
210 Flush(put_offset); 217 Flush(put_offset);
211 TryUpdateState(); 218 TryUpdateState();
212 if (last_known_get == last_state_.get_offset) { 219 if (last_known_get == last_state_.get_offset) {
213 // Send will flag state with lost context if IPC fails. 220 // Send will flag state with lost context if IPC fails.
214 if (last_state_.error == gpu::error::kNoError) { 221 if (last_state_.error == gpu::error::kNoError) {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 void CommandBufferProxyImpl::SendManagedMemoryStats( 532 void CommandBufferProxyImpl::SendManagedMemoryStats(
526 const GpuManagedMemoryStats& stats) { 533 const GpuManagedMemoryStats& stats) {
527 if (last_state_.error != gpu::error::kNoError) 534 if (last_state_.error != gpu::error::kNoError)
528 return; 535 return;
529 536
530 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_, 537 Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_,
531 stats)); 538 stats));
532 } 539 }
533 540
534 } // namespace content 541 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698