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/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 // (i.e. property modifications) causing some to fall on one frame and some to | 667 // (i.e. property modifications) causing some to fall on one frame and some to |
668 // fall on the next. Doing it asynchronously instead matches the semantics of | 668 // fall on the next. Doing it asynchronously instead matches the semantics of |
669 // ThreadProxy::SetNeedsCommit where SetNeedsCommit will not cause a | 669 // ThreadProxy::SetNeedsCommit where SetNeedsCommit will not cause a |
670 // synchronous commit. | 670 // synchronous commit. |
671 MainThreadTaskRunner()->PostTask( | 671 MainThreadTaskRunner()->PostTask( |
672 FROM_HERE, | 672 FROM_HERE, |
673 base::Bind(&SingleThreadProxy::BeginMainFrame, | 673 base::Bind(&SingleThreadProxy::BeginMainFrame, |
674 weak_factory_.GetWeakPtr())); | 674 weak_factory_.GetWeakPtr())); |
675 } | 675 } |
676 | 676 |
| 677 void SingleThreadProxy::SendBeginMainFrameNoLongerRequired() { |
| 678 layer_tree_host_->BeginMainFrameNoLongerRequired(); |
| 679 } |
| 680 |
677 void SingleThreadProxy::BeginMainFrame() { | 681 void SingleThreadProxy::BeginMainFrame() { |
678 if (defer_commits_) { | 682 if (defer_commits_) { |
679 TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit", | 683 TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit", |
680 TRACE_EVENT_SCOPE_THREAD); | 684 TRACE_EVENT_SCOPE_THREAD); |
681 BeginMainFrameAbortedOnImplThread( | 685 BeginMainFrameAbortedOnImplThread( |
682 CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT); | 686 CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT); |
683 return; | 687 return; |
684 } | 688 } |
685 | 689 |
686 // This checker assumes NotifyReadyToCommit in this stack causes a synchronous | 690 // This checker assumes NotifyReadyToCommit in this stack causes a synchronous |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 819 |
816 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 820 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
817 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 821 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
818 } | 822 } |
819 | 823 |
820 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 824 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
821 layer_tree_host_->SendBeginFramesToChildren(args); | 825 layer_tree_host_->SendBeginFramesToChildren(args); |
822 } | 826 } |
823 | 827 |
824 } // namespace cc | 828 } // namespace cc |
OLD | NEW |