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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 CompletionEvent* completion) { | 623 CompletionEvent* completion) { |
624 if (impl().layer_tree_host_impl->renderer()) | 624 if (impl().layer_tree_host_impl->renderer()) |
625 impl().layer_tree_host_impl->renderer()->DoNoOp(); | 625 impl().layer_tree_host_impl->renderer()->DoNoOp(); |
626 completion->Signal(); | 626 completion->Signal(); |
627 } | 627 } |
628 | 628 |
629 bool ThreadProxy::SupportsImplScrolling() const { | 629 bool ThreadProxy::SupportsImplScrolling() const { |
630 return true; | 630 return true; |
631 } | 631 } |
632 | 632 |
633 void ThreadProxy::SetDebugState(const LayerTreeDebugState& debug_state) { | |
634 Proxy::ImplThreadTaskRunner()->PostTask( | |
635 FROM_HERE, | |
636 base::Bind(&ThreadProxy::SetDebugStateOnImplThread, | |
637 impl_thread_weak_ptr_, | |
638 debug_state)); | |
639 } | |
640 | |
641 void ThreadProxy::SetDebugStateOnImplThread( | |
642 const LayerTreeDebugState& debug_state) { | |
643 DCHECK(IsImplThread()); | |
644 impl().scheduler->SetContinuousPainting(debug_state.continuous_painting); | |
645 } | |
646 | |
647 void ThreadProxy::FinishAllRenderingOnImplThread(CompletionEvent* completion) { | 633 void ThreadProxy::FinishAllRenderingOnImplThread(CompletionEvent* completion) { |
648 TRACE_EVENT0("cc", "ThreadProxy::FinishAllRenderingOnImplThread"); | 634 TRACE_EVENT0("cc", "ThreadProxy::FinishAllRenderingOnImplThread"); |
649 DCHECK(IsImplThread()); | 635 DCHECK(IsImplThread()); |
650 impl().layer_tree_host_impl->FinishAllRendering(); | 636 impl().layer_tree_host_impl->FinishAllRendering(); |
651 completion->Signal(); | 637 completion->Signal(); |
652 } | 638 } |
653 | 639 |
654 void ThreadProxy::ScheduledActionSendBeginMainFrame() { | 640 void ThreadProxy::ScheduledActionSendBeginMainFrame() { |
655 unsigned int begin_frame_id = nextBeginFrameId++; | 641 unsigned int begin_frame_id = nextBeginFrameId++; |
656 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( | 642 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 | 1240 |
1255 void ThreadProxy::PostFrameTimingEvents( | 1241 void ThreadProxy::PostFrameTimingEvents( |
1256 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 1242 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
1257 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | 1243 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
1258 DCHECK(IsMainThread()); | 1244 DCHECK(IsMainThread()); |
1259 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), | 1245 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), |
1260 main_frame_events.Pass()); | 1246 main_frame_events.Pass()); |
1261 } | 1247 } |
1262 | 1248 |
1263 } // namespace cc | 1249 } // namespace cc |
OLD | NEW |