OLD | NEW |
---|---|
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 Loading... | |
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/10 00:32:29
Can you rename this to be something other than "Be
vmpstr
2015/03/16 18:36:43
Done.
| |
695 impl().scheduler->LastBeginImplFrameTime()); | |
mithro-old
2015/03/11 04:01:33
What is LastBeginImplFrameTime here?
If it is as
vmpstr
2015/03/16 18:36:43
Done.
| |
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 Loading... | |
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 { | |
mithro-old
2015/03/11 04:01:33
What is this used for?
vmpstr
2015/03/16 18:36:43
This plumbs the next predicted raf time to lthi vi
| |
1400 DCHECK(IsImplThread()); | |
1401 return impl().scheduler->NextBeginImplFrameTimeIfRequested(); | |
1402 } | |
1403 | |
1397 } // namespace cc | 1404 } // namespace cc |
OLD | NEW |