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

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

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 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
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('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 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 if (!impl().layer_tree_host_impl->settings().impl_side_painting) { 685 if (!impl().layer_tree_host_impl->settings().impl_side_painting) {
686 DCHECK_GT(impl().layer_tree_host_impl->memory_allocation_limit_bytes(), 0u); 686 DCHECK_GT(impl().layer_tree_host_impl->memory_allocation_limit_bytes(), 0u);
687 } 687 }
688 begin_main_frame_state->memory_allocation_limit_bytes = 688 begin_main_frame_state->memory_allocation_limit_bytes =
689 impl().layer_tree_host_impl->memory_allocation_limit_bytes(); 689 impl().layer_tree_host_impl->memory_allocation_limit_bytes();
690 begin_main_frame_state->memory_allocation_priority_cutoff = 690 begin_main_frame_state->memory_allocation_priority_cutoff =
691 impl().layer_tree_host_impl->memory_allocation_priority_cutoff(); 691 impl().layer_tree_host_impl->memory_allocation_priority_cutoff();
692 begin_main_frame_state->evicted_ui_resources = 692 begin_main_frame_state->evicted_ui_resources =
693 impl().layer_tree_host_impl->EvictedUIResourcesExist(); 693 impl().layer_tree_host_impl->EvictedUIResourcesExist();
694 impl().layer_tree_host_impl->SetBeginMainFrameTime(
695 impl().scheduler->LastBeginImplFrameTime());
enne (OOO) 2015/03/06 21:27:55 I still think this is a little weird, in that a lo
694 Proxy::MainThreadTaskRunner()->PostTask( 696 Proxy::MainThreadTaskRunner()->PostTask(
695 FROM_HERE, 697 FROM_HERE,
696 base::Bind(&ThreadProxy::BeginMainFrame, 698 base::Bind(&ThreadProxy::BeginMainFrame,
697 main_thread_weak_ptr_, 699 main_thread_weak_ptr_,
698 base::Passed(&begin_main_frame_state))); 700 base::Passed(&begin_main_frame_state)));
699 devtools_instrumentation::DidRequestMainThreadFrame( 701 devtools_instrumentation::DidRequestMainThreadFrame(
700 impl().layer_tree_host_id); 702 impl().layer_tree_host_id);
701 impl().timing_history.DidBeginMainFrame(); 703 impl().timing_history.DidBeginMainFrame();
702 } 704 }
703 705
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 impl().scheduler->DidPrepareTiles(); 1389 impl().scheduler->DidPrepareTiles();
1388 } 1390 }
1389 1391
1390 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1392 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1391 DCHECK(IsImplThread()); 1393 DCHECK(IsImplThread());
1392 Proxy::MainThreadTaskRunner()->PostTask( 1394 Proxy::MainThreadTaskRunner()->PostTask(
1393 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1395 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1394 main_thread_weak_ptr_)); 1396 main_thread_weak_ptr_));
1395 } 1397 }
1396 1398
1399 base::TimeTicks ThreadProxy::GetNextBeginImplFrameTimeIfRequested() const {
1400 DCHECK(IsImplThread());
1401 return impl().scheduler->NextBeginImplFrameTimeIfRequested();
1402 }
1403
1397 } // namespace cc 1404 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698