Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: cc/trees/proxy_impl.cc

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: respond to Brian's comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void ProxyImpl::ScheduledActionBeginMainFrameNotExpectedUntil(
579 base::TimeTicks time) {
580 DCHECK(IsImplThread());
581 MainThreadTaskRunner()->PostTask(
582 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedUntil,
583 proxy_main_weak_ptr_, time));
584 }
585
578 DrawResult ProxyImpl::DrawInternal(bool forced_draw) { 586 DrawResult ProxyImpl::DrawInternal(bool forced_draw) {
579 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw"); 587 TRACE_EVENT_SYNTHETIC_DELAY("cc.Draw");
580 588
581 DCHECK(IsImplThread()); 589 DCHECK(IsImplThread());
582 DCHECK(layer_tree_host_impl_.get()); 590 DCHECK(layer_tree_host_impl_.get());
583 591
584 base::AutoReset<bool> mark_inside(&inside_draw_, true); 592 base::AutoReset<bool> mark_inside(&inside_draw_, true);
585 593
586 if (layer_tree_host_impl_->pending_tree()) { 594 if (layer_tree_host_impl_->pending_tree()) {
587 bool update_lcd_text = false; 595 bool update_lcd_text = false;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 657 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
650 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 658 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
651 return main_thread_blocked_commit_vars_unsafe_; 659 return main_thread_blocked_commit_vars_unsafe_;
652 } 660 }
653 661
654 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { 662 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() {
655 return task_runner_provider_->MainThreadTaskRunner(); 663 return task_runner_provider_->MainThreadTaskRunner();
656 } 664 }
657 665
658 } // namespace cc 666 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698