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

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

Issue 1000503002: Add BeginFrameObserverProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 // actually ready. 761 // actually ready.
762 bool SchedulerStateMachine::SupportsProactiveBeginFrame() const { 762 bool SchedulerStateMachine::SupportsProactiveBeginFrame() const {
763 // It is undesirable to proactively request BeginFrames if we are 763 // It is undesirable to proactively request BeginFrames if we are
764 // using a synchronous compositor because we *must* draw for every 764 // using a synchronous compositor because we *must* draw for every
765 // BeginFrame, which could cause duplicate draws. 765 // BeginFrame, which could cause duplicate draws.
766 return !settings_.using_synchronous_renderer_compositor; 766 return !settings_.using_synchronous_renderer_compositor;
767 } 767 }
768 768
769 void SchedulerStateMachine::SetChildrenNeedBeginFrames( 769 void SchedulerStateMachine::SetChildrenNeedBeginFrames(
770 bool children_need_begin_frames) { 770 bool children_need_begin_frames) {
771 DCHECK(settings_.forward_begin_frames_to_children);
772 children_need_begin_frames_ = children_need_begin_frames; 771 children_need_begin_frames_ = children_need_begin_frames;
773 } 772 }
774 773
775 void SchedulerStateMachine::SetDeferCommits(bool defer_commits) { 774 void SchedulerStateMachine::SetDeferCommits(bool defer_commits) {
776 defer_commits_ = defer_commits; 775 defer_commits_ = defer_commits;
777 } 776 }
778 777
779 // These are the cases where we definitely (or almost definitely) have a 778 // These are the cases where we definitely (or almost definitely) have a
780 // new frame to animate and/or draw and can draw. 779 // new frame to animate and/or draw and can draw.
781 bool SchedulerStateMachine::BeginFrameNeededToAnimateOrDraw() const { 780 bool SchedulerStateMachine::BeginFrameNeededToAnimateOrDraw() const {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 static_cast<int>(begin_impl_frame_state_), 1123 static_cast<int>(begin_impl_frame_state_),
1125 static_cast<int>(commit_state_), 1124 static_cast<int>(commit_state_),
1126 has_pending_tree_ ? 'T' : 'F', 1125 has_pending_tree_ ? 'T' : 'F',
1127 pending_tree_is_ready_for_activation_ ? 'T' : 'F', 1126 pending_tree_is_ready_for_activation_ ? 'T' : 'F',
1128 active_tree_needs_first_draw_ ? 'T' : 'F', 1127 active_tree_needs_first_draw_ ? 'T' : 'F',
1129 max_pending_swaps_, 1128 max_pending_swaps_,
1130 pending_swaps_); 1129 pending_swaps_);
1131 } 1130 }
1132 1131
1133 } // namespace cc 1132 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698