| 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 <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 layer_tree_host_impl_->InvalidateContentOnImplSide(); | 605 layer_tree_host_impl_->InvalidateContentOnImplSide(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { | 608 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { |
| 609 DCHECK(IsImplThread()); | 609 DCHECK(IsImplThread()); |
| 610 MainThreadTaskRunner()->PostTask( | 610 MainThreadTaskRunner()->PostTask( |
| 611 FROM_HERE, base::BindOnce(&ProxyMain::BeginMainFrameNotExpectedSoon, | 611 FROM_HERE, base::BindOnce(&ProxyMain::BeginMainFrameNotExpectedSoon, |
| 612 proxy_main_weak_ptr_)); | 612 proxy_main_weak_ptr_)); |
| 613 } | 613 } |
| 614 | 614 |
| 615 void ProxyImpl::ScheduledActionBeginMainFrameNotExpectedUntil( |
| 616 base::TimeTicks time) { |
| 617 DCHECK(IsImplThread()); |
| 618 MainThreadTaskRunner()->PostTask( |
| 619 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedUntil, |
| 620 proxy_main_weak_ptr_, time)); |
| 621 } |
| 622 |
| 615 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { | 623 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { |
| 616 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); | 624 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); |
| 617 | 625 |
| 618 DCHECK(IsImplThread()); | 626 DCHECK(IsImplThread()); |
| 619 DCHECK(layer_tree_host_impl_.get()); | 627 DCHECK(layer_tree_host_impl_.get()); |
| 620 | 628 |
| 621 base::AutoReset<bool> mark_inside(&inside_draw_, true); | 629 base::AutoReset<bool> mark_inside(&inside_draw_, true); |
| 622 | 630 |
| 623 if (layer_tree_host_impl_->pending_tree()) { | 631 if (layer_tree_host_impl_->pending_tree()) { |
| 624 bool update_lcd_text = false; | 632 bool update_lcd_text = false; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 694 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 687 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 695 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 688 return main_thread_blocked_commit_vars_unsafe_; | 696 return main_thread_blocked_commit_vars_unsafe_; |
| 689 } | 697 } |
| 690 | 698 |
| 691 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { | 699 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { |
| 692 return task_runner_provider_->MainThreadTaskRunner(); | 700 return task_runner_provider_->MainThreadTaskRunner(); |
| 693 } | 701 } |
| 694 | 702 |
| 695 } // namespace cc | 703 } // namespace cc |
| OLD | NEW |