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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix test compiler errors Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 63ba4149a169400480d36ffef9885402ce341439..9475fb1dffa4f55669868f2ef6f2686252624f71 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -26,7 +26,7 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
needs_forced_commit_(false),
expect_immediate_begin_frame_(false),
main_thread_needs_layer_textures_(false),
- inside_vsync_(false),
+ inside_begin_frame_(false),
visible_(false),
can_start_(false),
can_draw_(false),
@@ -78,7 +78,7 @@ std::string SchedulerStateMachine::ToString() {
base::StringAppendF(&str,
"main_thread_needs_layer_textures_ = %d; ",
main_thread_needs_layer_textures_);
- base::StringAppendF(&str, "inside_vsync_ = %d; ", inside_vsync_);
+ base::StringAppendF(&str, "inside_begin_frame_ = %d; ", inside_begin_frame_);
base::StringAppendF(&str, "visible_ = %d; ", visible_);
base::StringAppendF(&str, "can_start_ = %d; ", can_start_);
base::StringAppendF(&str, "can_draw_ = %d; ", can_draw_);
@@ -129,7 +129,7 @@ bool SchedulerStateMachine::ShouldDraw() const {
if (!ScheduledToDraw())
return false;
- if (!inside_vsync_)
+ if (!inside_begin_frame_)
return false;
if (HasDrawnThisFrame())
return false;
@@ -139,7 +139,7 @@ bool SchedulerStateMachine::ShouldDraw() const {
}
bool SchedulerStateMachine::ShouldAttemptTreeActivation() const {
- return has_pending_tree_ && inside_vsync_ &&
+ return has_pending_tree_ && inside_begin_frame_ &&
!HasAttemptedTreeActivationThisFrame();
}
@@ -163,7 +163,7 @@ bool SchedulerStateMachine::ShouldAcquireLayerTexturesForMainThread() const {
// impl thread is not even scheduled to draw. Guards against deadlocking.
if (!ScheduledToDraw())
return true;
- if (!VSyncCallbackNeeded())
+ if (!BeginFrameCallbackNeeded())
return true;
return false;
}
@@ -293,7 +293,7 @@ void SchedulerStateMachine::UpdateState(Action action) {
needs_forced_redraw_ = false;
draw_if_possible_failed_ = false;
swap_used_incomplete_tile_ = false;
- if (inside_vsync_)
+ if (inside_begin_frame_)
last_frame_number_where_draw_was_called_ = current_frame_number_;
if (commit_state_ == COMMIT_STATE_WAITING_FOR_FIRST_FORCED_DRAW) {
DCHECK(expect_immediate_begin_frame_);
@@ -327,7 +327,7 @@ void SchedulerStateMachine::SetMainThreadNeedsLayerTextures() {
main_thread_needs_layer_textures_ = true;
}
-bool SchedulerStateMachine::VSyncCallbackNeeded() const {
+bool SchedulerStateMachine::BeginFrameCallbackNeeded() const {
// If we have a pending tree, need to keep getting notifications until
// the tree is ready to be swapped.
if (has_pending_tree_)
@@ -347,11 +347,11 @@ bool SchedulerStateMachine::VSyncCallbackNeeded() const {
output_surface_state_ == OUTPUT_SURFACE_ACTIVE;
}
-void SchedulerStateMachine::DidEnterVSync() { inside_vsync_ = true; }
+void SchedulerStateMachine::DidEnterBeginFrame() { inside_begin_frame_ = true; }
-void SchedulerStateMachine::DidLeaveVSync() {
+void SchedulerStateMachine::DidLeaveBeginFrame() {
current_frame_number_++;
- inside_vsync_ = false;
+ inside_begin_frame_ = false;
}
void SchedulerStateMachine::SetVisible(bool visible) { visible_ = visible; }

Powered by Google App Engine
This is Rietveld 408576698