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

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

Issue 1059503003: Enable 2 pending frames on ARM devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 // We need a new commit for the forced redraw. This honors the 417 // We need a new commit for the forced redraw. This honors the
418 // single commit per interval because the result will be swapped to screen. 418 // single commit per interval because the result will be swapped to screen.
419 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_COMMIT) 419 if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_COMMIT)
420 return true; 420 return true;
421 421
422 // We shouldn't normally accept commits if there isn't an OutputSurface. 422 // We shouldn't normally accept commits if there isn't an OutputSurface.
423 if (!HasInitializedOutputSurface()) 423 if (!HasInitializedOutputSurface())
424 return false; 424 return false;
425 425
426 // SwapAck throttle the BeginMainFrames unless we just swapped.
427 // TODO(brianderson): Remove this restriction to improve throughput.
brianderson 2015/04/03 22:44:01 Beware that this aspect of the patch might introdu
alexst (slow to review) 2015/04/04 00:20:02 On intel, just the other part was enough, on ARM,
428 bool just_swapped_in_deadline =
429 begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE &&
430 perform_swap_funnel_;
431 if (pending_swaps_ >= max_pending_swaps_ && !just_swapped_in_deadline)
432 return false;
433
434 if (skip_begin_main_frame_to_reduce_latency_) 426 if (skip_begin_main_frame_to_reduce_latency_)
435 return false; 427 return false;
436 428
437 return true; 429 return true;
438 } 430 }
439 431
440 bool SchedulerStateMachine::ShouldCommit() const { 432 bool SchedulerStateMachine::ShouldCommit() const {
441 if (commit_state_ != COMMIT_STATE_READY_TO_COMMIT) 433 if (commit_state_ != COMMIT_STATE_READY_TO_COMMIT)
442 return false; 434 return false;
443 435
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 static_cast<int>(begin_impl_frame_state_), 1072 static_cast<int>(begin_impl_frame_state_),
1081 static_cast<int>(commit_state_), 1073 static_cast<int>(commit_state_),
1082 has_pending_tree_ ? 'T' : 'F', 1074 has_pending_tree_ ? 'T' : 'F',
1083 pending_tree_is_ready_for_activation_ ? 'T' : 'F', 1075 pending_tree_is_ready_for_activation_ ? 'T' : 'F',
1084 active_tree_needs_first_draw_ ? 'T' : 'F', 1076 active_tree_needs_first_draw_ ? 'T' : 'F',
1085 max_pending_swaps_, 1077 max_pending_swaps_,
1086 pending_swaps_); 1078 pending_swaps_);
1087 } 1079 }
1088 1080
1089 } // namespace cc 1081 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698