Chromium Code Reviews| 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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 568 layer_tree_host_impl_->InvalidateContentOnImplSide(); | 568 layer_tree_host_impl_->InvalidateContentOnImplSide(); |
| 569 } | 569 } |
| 570 | 570 |
| 571 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { | 571 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { |
| 572 DCHECK(IsImplThread()); | 572 DCHECK(IsImplThread()); |
| 573 MainThreadTaskRunner()->PostTask( | 573 MainThreadTaskRunner()->PostTask( |
| 574 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, | 574 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, |
| 575 proxy_main_weak_ptr_)); | 575 proxy_main_weak_ptr_)); |
| 576 } | 576 } |
| 577 | 577 |
| 578 int ProxyImpl::SyncTreeSourceFrameNumber() { | |
|
vmpstr
2017/04/05 19:11:33
Based on the name, is this meant to check LTHI::sy
panicker
2017/04/08 00:29:07
I do want the pending tree. Should I rename the me
| |
| 579 if (layer_tree_host_impl_->pending_tree()) | |
| 580 return layer_tree_host_impl_->pending_tree()->source_frame_number(); | |
| 581 else | |
| 582 return 0; | |
| 583 } | |
| 584 | |
| 578 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { | 585 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { |
| 579 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); | 586 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); |
| 580 | 587 |
| 581 DCHECK(IsImplThread()); | 588 DCHECK(IsImplThread()); |
| 582 DCHECK(layer_tree_host_impl_.get()); | 589 DCHECK(layer_tree_host_impl_.get()); |
| 583 | 590 |
| 584 base::AutoReset<bool> mark_inside(&inside_draw_, true); | 591 base::AutoReset<bool> mark_inside(&inside_draw_, true); |
| 585 | 592 |
| 586 if (layer_tree_host_impl_->pending_tree()) { | 593 if (layer_tree_host_impl_->pending_tree()) { |
| 587 bool update_lcd_text = false; | 594 bool update_lcd_text = false; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 649 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 656 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 650 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 657 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 651 return main_thread_blocked_commit_vars_unsafe_; | 658 return main_thread_blocked_commit_vars_unsafe_; |
| 652 } | 659 } |
| 653 | 660 |
| 654 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { | 661 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { |
| 655 return task_runner_provider_->MainThreadTaskRunner(); | 662 return task_runner_provider_->MainThreadTaskRunner(); |
| 656 } | 663 } |
| 657 | 664 |
| 658 } // namespace cc | 665 } // namespace cc |
| OLD | NEW |