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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 return false; | 418 return false; |
419 | 419 |
420 // Don't send BeginMainFrame early if we are prioritizing the active tree | 420 // Don't send BeginMainFrame early if we are prioritizing the active tree |
421 // because of impl_latency_takes_priority_. | 421 // because of impl_latency_takes_priority_. |
422 if (impl_latency_takes_priority_ && | 422 if (impl_latency_takes_priority_ && |
423 (has_pending_tree_ || active_tree_needs_first_draw_)) { | 423 (has_pending_tree_ || active_tree_needs_first_draw_)) { |
424 return false; | 424 return false; |
425 } | 425 } |
426 | 426 |
427 // We want to start the first commit after we get a new output surface ASAP. | 427 // We want to start the first commit after we get a new output surface ASAP. |
428 if (output_surface_state_ == OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT) | 428 // if (output_surface_state_ == OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT) |
429 return true; | 429 // return true; |
mithro-old
2014/12/12 15:08:59
This is the problematic bit. We send a request off
| |
430 | 430 |
431 // We should not send BeginMainFrame while we are in | 431 // We should not send BeginMainFrame while we are in |
432 // BEGIN_IMPL_FRAME_STATE_IDLE since we might have new | 432 // BEGIN_IMPL_FRAME_STATE_IDLE since we might have new |
433 // user input arriving soon. | 433 // user input arriving soon. |
434 // TODO(brianderson): Allow sending BeginMainFrame while idle when the main | 434 // TODO(brianderson): Allow sending BeginMainFrame while idle when the main |
435 // thread isn't consuming user input. | 435 // thread isn't consuming user input. |
436 if (begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_IDLE && | 436 if (begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_IDLE && |
437 BeginFrameNeeded()) | 437 BeginFrameNeeded()) |
438 return false; | 438 return false; |
439 | 439 |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1095 static_cast<int>(begin_impl_frame_state_), | 1095 static_cast<int>(begin_impl_frame_state_), |
1096 static_cast<int>(commit_state_), | 1096 static_cast<int>(commit_state_), |
1097 has_pending_tree_ ? 'T' : 'F', | 1097 has_pending_tree_ ? 'T' : 'F', |
1098 pending_tree_is_ready_for_activation_ ? 'T' : 'F', | 1098 pending_tree_is_ready_for_activation_ ? 'T' : 'F', |
1099 active_tree_needs_first_draw_ ? 'T' : 'F', | 1099 active_tree_needs_first_draw_ ? 'T' : 'F', |
1100 max_pending_swaps_, | 1100 max_pending_swaps_, |
1101 pending_swaps_); | 1101 pending_swaps_); |
1102 } | 1102 } |
1103 | 1103 |
1104 } // namespace cc | 1104 } // namespace cc |
OLD | NEW |