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

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_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(
enne (OOO) 2015/03/06 00:00:57 I'm not quite sure I follow what this is doing. W
vmpstr 2015/03/06 00:59:53 So this is meant to capture the time it takes for
695 impl().scheduler->LastBeginImplFrameTime());
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 impl().scheduler->DidPrepareTiles(); 1390 impl().scheduler->DidPrepareTiles();
1389 } 1391 }
1390 1392
1391 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1393 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1392 DCHECK(IsImplThread()); 1394 DCHECK(IsImplThread());
1393 Proxy::MainThreadTaskRunner()->PostTask( 1395 Proxy::MainThreadTaskRunner()->PostTask(
1394 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1396 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1395 main_thread_weak_ptr_)); 1397 main_thread_weak_ptr_));
1396 } 1398 }
1397 1399
1400 base::TimeTicks ThreadProxy::GetNextBeginImplFrameTimeIfRequested() const {
1401 DCHECK(IsImplThread());
1402 return impl().scheduler->NextBeginImplFrameTimeIfRequested();
1403 }
1404
1398 } // namespace cc 1405 } // namespace cc
OLDNEW
« cc/trees/layer_tree_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