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

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 12780025: cc: Chromify rendering_stats (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/thread.h" 10 #include "cc/base/thread.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void ThreadProxy::CollectRenderingStats(RenderingStats* stats) { 281 void ThreadProxy::CollectRenderingStats(RenderingStats* stats) {
282 DCHECK(IsMainThread()); 282 DCHECK(IsMainThread());
283 283
284 DebugScopedSetMainThreadBlocked main_thread_blocked(this); 284 DebugScopedSetMainThreadBlocked main_thread_blocked(this);
285 CompletionEvent completion; 285 CompletionEvent completion;
286 Proxy::ImplThread()->PostTask( 286 Proxy::ImplThread()->PostTask(
287 base::Bind(&ThreadProxy::RenderingStatsOnImplThread, 287 base::Bind(&ThreadProxy::RenderingStatsOnImplThread,
288 impl_thread_weak_ptr_, 288 impl_thread_weak_ptr_,
289 &completion, 289 &completion,
290 stats)); 290 stats));
291 stats->totalCommitTime = total_commit_time_; 291 stats->total_commit_time = total_commit_time_;
292 stats->totalCommitCount = total_commit_count_; 292 stats->total_commit_count = total_commit_count_;
293 293
294 completion.Wait(); 294 completion.Wait();
295 } 295 }
296 296
297 const RendererCapabilities& ThreadProxy::GetRendererCapabilities() const { 297 const RendererCapabilities& ThreadProxy::GetRendererCapabilities() const {
298 DCHECK(renderer_initialized_); 298 DCHECK(renderer_initialized_);
299 return renderer_capabilities_main_thread_copy_; 299 return renderer_capabilities_main_thread_copy_;
300 } 300 }
301 301
302 void ThreadProxy::SetNeedsAnimate() { 302 void ThreadProxy::SetNeedsAnimate() {
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, 1333 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread,
1334 impl_thread_weak_ptr_), 1334 impl_thread_weak_ptr_),
1335 delay); 1335 delay);
1336 } 1336 }
1337 1337
1338 void ThreadProxy::StartScrollbarAnimationOnImplThread() { 1338 void ThreadProxy::StartScrollbarAnimationOnImplThread() {
1339 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); 1339 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now());
1340 } 1340 }
1341 1341
1342 } // namespace cc 1342 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698