| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/proxy_impl.h" | 5 #include "cc/trees/proxy_impl.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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 layer_tree_host_impl_->InvalidateContentOnImplSide(); | 562 layer_tree_host_impl_->InvalidateContentOnImplSide(); |
| 563 } | 563 } |
| 564 | 564 |
| 565 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { | 565 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { |
| 566 DCHECK(IsImplThread()); | 566 DCHECK(IsImplThread()); |
| 567 MainThreadTaskRunner()->PostTask( | 567 MainThreadTaskRunner()->PostTask( |
| 568 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, | 568 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, |
| 569 proxy_main_weak_ptr_)); | 569 proxy_main_weak_ptr_)); |
| 570 } | 570 } |
| 571 | 571 |
| 572 void ProxyImpl::ScheduledActionBeginMainFrameNotExpectedUntil( |
| 573 base::TimeTicks frame_time) { |
| 574 DCHECK(IsImplThread()); |
| 575 MainThreadTaskRunner()->PostTask( |
| 576 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedUntil, |
| 577 proxy_main_weak_ptr_, frame_time)); |
| 578 } |
| 579 |
| 572 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { | 580 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { |
| 573 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); | 581 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); |
| 574 | 582 |
| 575 DCHECK(IsImplThread()); | 583 DCHECK(IsImplThread()); |
| 576 DCHECK(layer_tree_host_impl_.get()); | 584 DCHECK(layer_tree_host_impl_.get()); |
| 577 | 585 |
| 578 base::AutoReset<bool> mark_inside(&inside_draw_, true); | 586 base::AutoReset<bool> mark_inside(&inside_draw_, true); |
| 579 | 587 |
| 580 if (layer_tree_host_impl_->pending_tree()) { | 588 if (layer_tree_host_impl_->pending_tree()) { |
| 581 bool update_lcd_text = false; | 589 bool update_lcd_text = false; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 651 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 644 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 652 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 645 return main_thread_blocked_commit_vars_unsafe_; | 653 return main_thread_blocked_commit_vars_unsafe_; |
| 646 } | 654 } |
| 647 | 655 |
| 648 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { | 656 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { |
| 649 return task_runner_provider_->MainThreadTaskRunner(); | 657 return task_runner_provider_->MainThreadTaskRunner(); |
| 650 } | 658 } |
| 651 | 659 |
| 652 } // namespace cc | 660 } // namespace cc |
| OLD | NEW |