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

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: Build fix. 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
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/thread_proxy.h » ('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/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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // We guard PrepareToDraw() with CanDraw() because it always returns a valid 423 // We guard PrepareToDraw() with CanDraw() because it always returns a valid
424 // frame, so can only be used when such a frame is possible. Since 424 // frame, so can only be used when such a frame is possible. Since
425 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on 425 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on
426 // CanDraw() as well. 426 // CanDraw() as well.
427 if (!ShouldComposite()) { 427 if (!ShouldComposite()) {
428 UpdateBackgroundAnimateTicking(); 428 UpdateBackgroundAnimateTicking();
429 return false; 429 return false;
430 } 430 }
431 431
432 layer_tree_host_impl_->Animate( 432 layer_tree_host_impl_->Animate(
433 layer_tree_host_impl_->CurrentFrameTimeTicks()); 433 layer_tree_host_impl_->CurrentBeginFrameArgs().frame_time);
434 UpdateBackgroundAnimateTicking(); 434 UpdateBackgroundAnimateTicking();
435 435
436 if (!layer_tree_host_impl_->IsContextLost()) { 436 if (!layer_tree_host_impl_->IsContextLost()) {
437 layer_tree_host_impl_->PrepareToDraw(frame); 437 layer_tree_host_impl_->PrepareToDraw(frame);
438 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); 438 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time);
439 layer_tree_host_impl_->DidDrawAllLayers(*frame); 439 layer_tree_host_impl_->DidDrawAllLayers(*frame);
440 } 440 }
441 lost_output_surface = layer_tree_host_impl_->IsContextLost(); 441 lost_output_surface = layer_tree_host_impl_->IsContextLost();
442 442
443 bool start_ready_animations = true; 443 bool start_ready_animations = true;
444 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); 444 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations);
445 445
446 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); 446 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
447 } 447 }
448 448
449 if (lost_output_surface) { 449 if (lost_output_surface) {
450 layer_tree_host_->DidLoseOutputSurface(); 450 layer_tree_host_->DidLoseOutputSurface();
451 return false; 451 return false;
452 } 452 }
453 453
454 return true; 454 return true;
455 } 455 }
456 456
457 void SingleThreadProxy::DidSwapFrame() { 457 void SingleThreadProxy::DidSwapFrame() {
458 if (next_frame_is_newly_committed_frame_) { 458 if (next_frame_is_newly_committed_frame_) {
459 next_frame_is_newly_committed_frame_ = false; 459 next_frame_is_newly_committed_frame_ = false;
460 layer_tree_host_->DidCommitAndDrawFrame(); 460 layer_tree_host_->DidCommitAndDrawFrame();
461 } 461 }
462 } 462 }
463 463
464 bool SingleThreadProxy::MainFrameWillHappenForTesting() { 464 bool SingleThreadProxy::MainFrameWillHappenForTesting() {
465 return false; 465 return false;
466 } 466 }
467 467
468 } // namespace cc 468 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698