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

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

Issue 2323063004: cc: Remove frame queuing from the scheduler. (Closed)
Patch Set: nit Created 4 years, 3 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 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_state_machine.h" 5 #include "cc/scheduler/scheduler_state_machine.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 // Do not queue too many swaps. 359 // Do not queue too many swaps.
360 if (SwapThrottled()) 360 if (SwapThrottled())
361 return false; 361 return false;
362 362
363 // Except for the cases above, do not draw outside of the BeginImplFrame 363 // Except for the cases above, do not draw outside of the BeginImplFrame
364 // deadline. 364 // deadline.
365 if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) 365 if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE)
366 return false; 366 return false;
367 367
368 if (wait_for_ready_to_draw_)
369 return false;
370
368 // Only handle forced redraws due to timeouts on the regular deadline. 371 // Only handle forced redraws due to timeouts on the regular deadline.
369 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) 372 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW)
370 return true; 373 return true;
371 374
372 return needs_redraw_; 375 return needs_redraw_;
373 } 376 }
374 377
375 bool SchedulerStateMachine::ShouldActivatePendingTree() const { 378 bool SchedulerStateMachine::ShouldActivatePendingTree() const {
376 // There is nothing to activate. 379 // There is nothing to activate.
377 if (!has_pending_tree_) 380 if (!has_pending_tree_)
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 case OUTPUT_SURFACE_ACTIVE: 1109 case OUTPUT_SURFACE_ACTIVE:
1107 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1110 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1108 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1111 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1109 return true; 1112 return true;
1110 } 1113 }
1111 NOTREACHED(); 1114 NOTREACHED();
1112 return false; 1115 return false;
1113 } 1116 }
1114 1117
1115 } // namespace cc 1118 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698