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. |