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

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 429743003: Rename Animate as Begin(Main)Frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a typo that made tests fail. Created 6 years, 4 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 | Annotate | Revision Log
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/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // We guard PrepareToDraw() with CanDraw() because it always returns a valid 420 // We guard PrepareToDraw() with CanDraw() because it always returns a valid
421 // frame, so can only be used when such a frame is possible. Since 421 // frame, so can only be used when such a frame is possible. Since
422 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on 422 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on
423 // CanDraw() as well. 423 // CanDraw() as well.
424 if (!ShouldComposite()) { 424 if (!ShouldComposite()) {
425 UpdateBackgroundAnimateTicking(); 425 UpdateBackgroundAnimateTicking();
426 return false; 426 return false;
427 } 427 }
428 428
429 layer_tree_host_impl_->Animate( 429 layer_tree_host_impl_->Animate(
430 layer_tree_host_impl_->CurrentFrameTimeTicks()); 430 layer_tree_host_impl_->CurrentBeginFrameArgs().frame_time);
431 UpdateBackgroundAnimateTicking(); 431 UpdateBackgroundAnimateTicking();
432 432
433 if (!layer_tree_host_impl_->IsContextLost()) { 433 if (!layer_tree_host_impl_->IsContextLost()) {
434 layer_tree_host_impl_->PrepareToDraw(frame); 434 layer_tree_host_impl_->PrepareToDraw(frame);
435 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); 435 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time);
436 layer_tree_host_impl_->DidDrawAllLayers(*frame); 436 layer_tree_host_impl_->DidDrawAllLayers(*frame);
437 } 437 }
438 lost_output_surface = layer_tree_host_impl_->IsContextLost(); 438 lost_output_surface = layer_tree_host_impl_->IsContextLost();
439 439
440 bool start_ready_animations = true; 440 bool start_ready_animations = true;
(...skipping 13 matching lines...) Expand all
454 void SingleThreadProxy::DidSwapFrame() { 454 void SingleThreadProxy::DidSwapFrame() {
455 if (next_frame_is_newly_committed_frame_) { 455 if (next_frame_is_newly_committed_frame_) {
456 next_frame_is_newly_committed_frame_ = false; 456 next_frame_is_newly_committed_frame_ = false;
457 layer_tree_host_->DidCommitAndDrawFrame(); 457 layer_tree_host_->DidCommitAndDrawFrame();
458 } 458 }
459 } 459 }
460 460
461 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 461 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
462 462
463 } // namespace cc 463 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698