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

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

Issue 1137823002: Pass collected frame timing events to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Import vmpstr's patch to plumb frame timing info without using a commit. Created 5 years, 6 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 Proxy::MainThreadTaskRunner()->PostTask( 1405 Proxy::MainThreadTaskRunner()->PostTask(
1406 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1406 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1407 main_thread_weak_ptr_)); 1407 main_thread_weak_ptr_));
1408 } 1408 }
1409 1409
1410 void ThreadProxy::OnDrawForOutputSurface() { 1410 void ThreadProxy::OnDrawForOutputSurface() {
1411 DCHECK(IsImplThread()); 1411 DCHECK(IsImplThread());
1412 impl().scheduler->OnDrawForOutputSurface(); 1412 impl().scheduler->OnDrawForOutputSurface();
1413 } 1413 }
1414 1414
1415 void ThreadProxy::PostFrameTimingEventsOnImplThread(
1416 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
1417 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
1418 DCHECK(IsImplThread());
1419 Proxy::MainThreadTaskRunner()->PostTask(
1420 FROM_HERE,
1421 base::Bind(&ThreadProxy::PostFrameTimingEvents, main_thread_weak_ptr_,
1422 base::Passed(composite_events.Pass()),
1423 base::Passed(main_frame_events.Pass())));
1424 }
1425
1426 void ThreadProxy::PostFrameTimingEvents(
enne (OOO) 2015/06/02 18:13:38 DCHECK(IsMainThread()) here?
MikeB 2015/06/02 21:59:36 Good catch!
1427 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
1428 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
1429 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(),
1430 main_frame_events.Pass());
1431 }
1432
1415 } // namespace cc 1433 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698