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

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

Issue 1108193003: cc: Small spelling fixes in scheduler_state_machine.cc (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 | no next file » | 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 // We only want to start output surface initialization after the 298 // We only want to start output surface initialization after the
299 // previous commit is complete. 299 // previous commit is complete.
300 if (commit_state_ != COMMIT_STATE_IDLE) 300 if (commit_state_ != COMMIT_STATE_IDLE)
301 return false; 301 return false;
302 302
303 // Make sure the BeginImplFrame from any previous OutputSurfaces 303 // Make sure the BeginImplFrame from any previous OutputSurfaces
304 // are complete before creating the new OutputSurface. 304 // are complete before creating the new OutputSurface.
305 if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_IDLE) 305 if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_IDLE)
306 return false; 306 return false;
307 307
308 // We want to clear the pipline of any pending draws and activations 308 // We want to clear the pipeline of any pending draws and activations
309 // before starting output surface initialization. This allows us to avoid 309 // before starting output surface initialization. This allows us to avoid
310 // weird corner cases where we abort draws or force activation while we 310 // weird corner cases where we abort draws or force activation while we
311 // are initializing the output surface. 311 // are initializing the output surface.
312 if (active_tree_needs_first_draw_ || has_pending_tree_) 312 if (active_tree_needs_first_draw_ || has_pending_tree_)
313 return false; 313 return false;
314 314
315 // We need to create the output surface if we don't have one and we haven't 315 // We need to create the output surface if we don't have one and we haven't
316 // started creating one yet. 316 // started creating one yet.
317 return output_surface_state_ == OUTPUT_SURFACE_LOST; 317 return output_surface_state_ == OUTPUT_SURFACE_LOST;
318 } 318 }
319 319
320 bool SchedulerStateMachine::ShouldDraw() const { 320 bool SchedulerStateMachine::ShouldDraw() const {
321 // If we need to abort draws, we should do so ASAP since the draw could 321 // If we need to abort draws, we should do so ASAP since the draw could
322 // be blocking other important actions (like output surface initialization), 322 // be blocking other important actions (like output surface initialization),
323 // from occuring. If we are waiting for the first draw, then perfom the 323 // from occurring. If we are waiting for the first draw, then perform the
324 // aborted draw to keep things moving. If we are not waiting for the first 324 // aborted draw to keep things moving. If we are not waiting for the first
325 // draw however, we don't want to abort for no reason. 325 // draw however, we don't want to abort for no reason.
326 if (PendingDrawsShouldBeAborted()) 326 if (PendingDrawsShouldBeAborted())
327 return active_tree_needs_first_draw_; 327 return active_tree_needs_first_draw_;
328 328
329 // Do not draw too many times in a single frame. It's okay that we don't check 329 // Do not draw too many times in a single frame. It's okay that we don't check
330 // this before checking for aborted draws because aborted draws do not request 330 // this before checking for aborted draws because aborted draws do not request
331 // a swap. 331 // a swap.
332 if (request_swap_funnel_) 332 if (request_swap_funnel_)
333 return false; 333 return false;
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 static_cast<int>(begin_impl_frame_state_), 1139 static_cast<int>(begin_impl_frame_state_),
1140 static_cast<int>(commit_state_), 1140 static_cast<int>(commit_state_),
1141 has_pending_tree_ ? 'T' : 'F', 1141 has_pending_tree_ ? 'T' : 'F',
1142 pending_tree_is_ready_for_activation_ ? 'T' : 'F', 1142 pending_tree_is_ready_for_activation_ ? 'T' : 'F',
1143 active_tree_needs_first_draw_ ? 'T' : 'F', 1143 active_tree_needs_first_draw_ ? 'T' : 'F',
1144 max_pending_swaps_, 1144 max_pending_swaps_,
1145 pending_swaps_); 1145 pending_swaps_);
1146 } 1146 }
1147 1147
1148 } // namespace cc 1148 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698