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

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 1394263004: android webview: allow cc to fail hardware draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: damage before hardware to avoid invalidate-draw loop Created 5 years, 1 month 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/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_state_machine.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 DCHECK_GE(draw_time.ToInternalValue(), 0); 130 DCHECK_GE(draw_time.ToInternalValue(), 0);
131 estimated_parent_draw_time_ = draw_time; 131 estimated_parent_draw_time_ = draw_time;
132 } 132 }
133 133
134 void Scheduler::SetVisible(bool visible) { 134 void Scheduler::SetVisible(bool visible) {
135 state_machine_.SetVisible(visible); 135 state_machine_.SetVisible(visible);
136 UpdateCompositorTimingHistoryRecordingEnabled(); 136 UpdateCompositorTimingHistoryRecordingEnabled();
137 ProcessScheduledActions(); 137 ProcessScheduledActions();
138 } 138 }
139 139
140 void Scheduler::SetResourcelessSoftareDraw(bool resourceless_draw) {
141 state_machine_.SetResourcelessSoftareDraw(resourceless_draw);
142 ProcessScheduledActions();
143 }
144
140 void Scheduler::SetCanDraw(bool can_draw) { 145 void Scheduler::SetCanDraw(bool can_draw) {
141 state_machine_.SetCanDraw(can_draw); 146 state_machine_.SetCanDraw(can_draw);
142 ProcessScheduledActions(); 147 ProcessScheduledActions();
143 } 148 }
144 149
145 void Scheduler::NotifyReadyToActivate() { 150 void Scheduler::NotifyReadyToActivate() {
146 compositor_timing_history_->ReadyToActivate(); 151 compositor_timing_history_->ReadyToActivate();
147 state_machine_.NotifyReadyToActivate(); 152 state_machine_.NotifyReadyToActivate();
148 ProcessScheduledActions(); 153 ProcessScheduledActions();
149 } 154 }
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 832 }
828 833
829 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 834 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
830 return (state_machine_.begin_main_frame_state() == 835 return (state_machine_.begin_main_frame_state() ==
831 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || 836 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT ||
832 state_machine_.begin_main_frame_state() == 837 state_machine_.begin_main_frame_state() ==
833 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); 838 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED);
834 } 839 }
835 840
836 } // namespace cc 841 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698