| 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/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/debug/devtools_instrumentation.h" | 10 #include "cc/debug/devtools_instrumentation.h" |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 // (i.e. property modifications) causing some to fall on one frame and some to | 671 // (i.e. property modifications) causing some to fall on one frame and some to |
| 672 // fall on the next. Doing it asynchronously instead matches the semantics of | 672 // fall on the next. Doing it asynchronously instead matches the semantics of |
| 673 // ThreadProxy::SetNeedsCommit where SetNeedsCommit will not cause a | 673 // ThreadProxy::SetNeedsCommit where SetNeedsCommit will not cause a |
| 674 // synchronous commit. | 674 // synchronous commit. |
| 675 MainThreadTaskRunner()->PostTask( | 675 MainThreadTaskRunner()->PostTask( |
| 676 FROM_HERE, | 676 FROM_HERE, |
| 677 base::Bind(&SingleThreadProxy::BeginMainFrame, | 677 base::Bind(&SingleThreadProxy::BeginMainFrame, |
| 678 weak_factory_.GetWeakPtr())); | 678 weak_factory_.GetWeakPtr())); |
| 679 } | 679 } |
| 680 | 680 |
| 681 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() { |
| 682 layer_tree_host_->BeginMainFrameNotExpectedSoon(); |
| 683 } |
| 684 |
| 681 void SingleThreadProxy::BeginMainFrame() { | 685 void SingleThreadProxy::BeginMainFrame() { |
| 682 if (defer_commits_) { | 686 if (defer_commits_) { |
| 683 TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit", | 687 TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit", |
| 684 TRACE_EVENT_SCOPE_THREAD); | 688 TRACE_EVENT_SCOPE_THREAD); |
| 685 BeginMainFrameAbortedOnImplThread( | 689 BeginMainFrameAbortedOnImplThread( |
| 686 CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT); | 690 CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT); |
| 687 return; | 691 return; |
| 688 } | 692 } |
| 689 | 693 |
| 690 // This checker assumes NotifyReadyToCommit in this stack causes a synchronous | 694 // This checker assumes NotifyReadyToCommit in this stack causes a synchronous |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 | 823 |
| 820 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 824 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 821 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 825 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 822 } | 826 } |
| 823 | 827 |
| 824 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 828 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 825 layer_tree_host_->SendBeginFramesToChildren(args); | 829 layer_tree_host_->SendBeginFramesToChildren(args); |
| 826 } | 830 } |
| 827 | 831 |
| 828 } // namespace cc | 832 } // namespace cc |
| OLD | NEW |