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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1050833002: cc: Remove background ticking from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index c512987bd23f501abdaf1fceab783945f8dc1ae4..30139adda2fcfe0b202f6010c48fd4568ba680a2 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -677,6 +677,11 @@ bool SchedulerStateMachine::BeginFrameNeeded() const {
if (!HasInitializedOutputSurface())
return false;
+ // If we are not visible, we don't need BeginFrame messages.
+ if (!visible_) {
brianderson 2015/04/01 21:58:08 Can you remove the visibility checks in BeginFrame
mithro-old 2015/04/02 01:03:59 I moved the !visible_ check into the BeginFrameNee
+ return false;
+ }
+
if (SupportsProactiveBeginFrame()) {
return (BeginFrameNeededToAnimateOrDraw() ||
BeginFrameNeededForChildren() ||
@@ -827,9 +832,9 @@ bool SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately()
if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_BEGIN_FRAME)
return false;
- // If we've lost the output surface, end the current BeginImplFrame ASAP
- // so we can start creating the next output surface.
- if (output_surface_state_ == OUTPUT_SURFACE_LOST)
+ // If things are being aborted, end the current BeginImplFrame ASAP so we can
+ // unblock creating the next output surface.
+ if (PendingDrawsShouldBeAborted())
brianderson 2015/04/01 21:58:08 This seems unrelated. Make this a separate patch?
mithro-old 2015/04/02 01:03:59 Done.
return true;
// SwapAck throttle the deadline since we wont draw and swap anyway.

Powered by Google App Engine
This is Rietveld 408576698