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

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

Issue 10868048: Report texture upload time in renderingStats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert to surface_id instead of route_id. Created 8 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/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/gpu_channel.h » ('j') | 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 #include "content/common/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 int route_id = command_buffer->GetRouteID(); 207 int route_id = command_buffer->GetRouteID();
208 Send(new GpuChannelMsg_DestroyCommandBuffer(route_id)); 208 Send(new GpuChannelMsg_DestroyCommandBuffer(route_id));
209 // Check the proxy has not already been removed after a channel error. 209 // Check the proxy has not already been removed after a channel error.
210 if (proxies_.find(route_id) != proxies_.end()) 210 if (proxies_.find(route_id) != proxies_.end())
211 proxies_.erase(route_id); 211 proxies_.erase(route_id);
212 RemoveRoute(route_id); 212 RemoveRoute(route_id);
213 delete command_buffer; 213 delete command_buffer;
214 #endif 214 #endif
215 } 215 }
216 216
217 bool GpuChannelHost::CollectRenderingStatsForSurface(
218 int surface_id, content::GpuRenderingStats* stats) {
219 TRACE_EVENT0("gpu", "GpuChannelHost::CollectRenderingStats");
220
221 return Send(new GpuChannelMsg_CollectRenderingStatsForSurface(surface_id,
222 stats));
223 }
224
217 void GpuChannelHost::AddRoute( 225 void GpuChannelHost::AddRoute(
218 int route_id, base::WeakPtr<IPC::Listener> listener) { 226 int route_id, base::WeakPtr<IPC::Listener> listener) {
219 DCHECK(MessageLoopProxy::current()); 227 DCHECK(MessageLoopProxy::current());
220 228
221 scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy(); 229 scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy();
222 io_loop->PostTask(FROM_HERE, 230 io_loop->PostTask(FROM_HERE,
223 base::Bind(&GpuChannelHost::MessageFilter::AddRoute, 231 base::Bind(&GpuChannelHost::MessageFilter::AddRoute,
224 channel_filter_.get(), route_id, listener, 232 channel_filter_.get(), route_id, listener,
225 MessageLoopProxy::current())); 233 MessageLoopProxy::current()));
226 } 234 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 const GpuListenerInfo& info = it->second; 309 const GpuListenerInfo& info = it->second;
302 info.loop->PostTask( 310 info.loop->PostTask(
303 FROM_HERE, 311 FROM_HERE,
304 base::Bind(&IPC::Listener::OnChannelError, info.listener)); 312 base::Bind(&IPC::Listener::OnChannelError, info.listener));
305 } 313 }
306 314
307 listeners_.clear(); 315 listeners_.clear();
308 } 316 }
309 317
310 318
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698