Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 return false; | 353 return false; |
| 354 | 354 |
| 355 // Don't draw if we are waiting on the first commit after a surface. | 355 // Don't draw if we are waiting on the first commit after a surface. |
| 356 if (output_surface_state_ != OUTPUT_SURFACE_ACTIVE) | 356 if (output_surface_state_ != OUTPUT_SURFACE_ACTIVE) |
| 357 return false; | 357 return false; |
| 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 if (wait_for_ready_to_draw_) | |
|
brianderson
2016/07/20 00:35:12
Does this help avoid drawing in the deadline in th
| |
| 364 return false; | |
| 365 | |
| 363 // Except for the cases above, do not draw outside of the BeginImplFrame | 366 // Except for the cases above, do not draw outside of the BeginImplFrame |
| 364 // deadline. | 367 // deadline. |
| 365 if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) | 368 if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE) |
| 366 return false; | 369 return false; |
| 367 | 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_; |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
| OLD | NEW |