OLD | NEW |
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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 UpdateBackgroundAnimateTicking(); | 437 UpdateBackgroundAnimateTicking(); |
438 return false; | 438 return false; |
439 } | 439 } |
440 | 440 |
441 layer_tree_host_impl_->Animate( | 441 layer_tree_host_impl_->Animate( |
442 layer_tree_host_impl_->CurrentFrameTimeTicks()); | 442 layer_tree_host_impl_->CurrentFrameTimeTicks()); |
443 UpdateBackgroundAnimateTicking(); | 443 UpdateBackgroundAnimateTicking(); |
444 | 444 |
445 if (!layer_tree_host_impl_->IsContextLost()) { | 445 if (!layer_tree_host_impl_->IsContextLost()) { |
446 layer_tree_host_impl_->PrepareToDraw(frame); | 446 layer_tree_host_impl_->PrepareToDraw(frame); |
447 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); | 447 layer_tree_host_impl_->DrawLayers(frame); |
448 layer_tree_host_impl_->DidDrawAllLayers(*frame); | 448 layer_tree_host_impl_->DidDrawAllLayers(*frame); |
449 } | 449 } |
450 lost_output_surface = layer_tree_host_impl_->IsContextLost(); | 450 lost_output_surface = layer_tree_host_impl_->IsContextLost(); |
451 | 451 |
452 bool start_ready_animations = true; | 452 bool start_ready_animations = true; |
453 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); | 453 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); |
454 | 454 |
455 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); | 455 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); |
456 } | 456 } |
457 | 457 |
458 if (lost_output_surface) { | 458 if (lost_output_surface) { |
459 layer_tree_host_->DidLoseOutputSurface(); | 459 layer_tree_host_->DidLoseOutputSurface(); |
460 return false; | 460 return false; |
461 } | 461 } |
462 | 462 |
463 return true; | 463 return true; |
464 } | 464 } |
465 | 465 |
466 void SingleThreadProxy::DidSwapFrame() { | 466 void SingleThreadProxy::DidSwapFrame() { |
467 if (next_frame_is_newly_committed_frame_) { | 467 if (next_frame_is_newly_committed_frame_) { |
468 next_frame_is_newly_committed_frame_ = false; | 468 next_frame_is_newly_committed_frame_ = false; |
469 layer_tree_host_->DidCommitAndDrawFrame(); | 469 layer_tree_host_->DidCommitAndDrawFrame(); |
470 } | 470 } |
471 } | 471 } |
472 | 472 |
473 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 473 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
474 | 474 |
475 } // namespace cc | 475 } // namespace cc |
OLD | NEW |