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

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: Add BeginMainFrameNotExpectedUntil to content::CompositorImpl for Android. Created 3 years, 7 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
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/proxy_main.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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
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
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
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/proxy_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698