Chromium Code Reviews| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 UpdateBackgroundAnimateTicking(); | 422 UpdateBackgroundAnimateTicking(); |
| 423 return false; | 423 return false; |
| 424 } | 424 } |
| 425 | 425 |
| 426 layer_tree_host_impl_->Animate( | 426 layer_tree_host_impl_->Animate( |
| 427 layer_tree_host_impl_->CurrentFrameTimeTicks()); | 427 layer_tree_host_impl_->CurrentFrameTimeTicks()); |
| 428 UpdateBackgroundAnimateTicking(); | 428 UpdateBackgroundAnimateTicking(); |
| 429 | 429 |
| 430 if (!layer_tree_host_impl_->IsContextLost()) { | 430 if (!layer_tree_host_impl_->IsContextLost()) { |
| 431 layer_tree_host_impl_->PrepareToDraw(frame); | 431 layer_tree_host_impl_->PrepareToDraw(frame); |
| 432 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); | 432 layer_tree_host_impl_->DrawLayers(frame); |
|
danakj
2014/07/02 18:51:38
How does the frame_begin_time get to the LTHI for
mithro-old
2014/07/07 05:27:32
(I fixed this code to use the CurrentFrameTimeTick
danakj
2014/07/07 20:56:44
The problem with doing it in animate is that we do
| |
| 433 layer_tree_host_impl_->DidDrawAllLayers(*frame); | 433 layer_tree_host_impl_->DidDrawAllLayers(*frame); |
| 434 } | 434 } |
| 435 lost_output_surface = layer_tree_host_impl_->IsContextLost(); | 435 lost_output_surface = layer_tree_host_impl_->IsContextLost(); |
| 436 | 436 |
| 437 bool start_ready_animations = true; | 437 bool start_ready_animations = true; |
| 438 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); | 438 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); |
| 439 | 439 |
| 440 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); | 440 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 if (lost_output_surface) { | 443 if (lost_output_surface) { |
| 444 layer_tree_host_->DidLoseOutputSurface(); | 444 layer_tree_host_->DidLoseOutputSurface(); |
| 445 return false; | 445 return false; |
| 446 } | 446 } |
| 447 | 447 |
| 448 return true; | 448 return true; |
| 449 } | 449 } |
| 450 | 450 |
| 451 void SingleThreadProxy::DidSwapFrame() { | 451 void SingleThreadProxy::DidSwapFrame() { |
| 452 if (next_frame_is_newly_committed_frame_) { | 452 if (next_frame_is_newly_committed_frame_) { |
| 453 next_frame_is_newly_committed_frame_ = false; | 453 next_frame_is_newly_committed_frame_ = false; |
| 454 layer_tree_host_->DidCommitAndDrawFrame(); | 454 layer_tree_host_->DidCommitAndDrawFrame(); |
| 455 } | 455 } |
| 456 } | 456 } |
| 457 | 457 |
| 458 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 458 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 459 | 459 |
| 460 } // namespace cc | 460 } // namespace cc |
| OLD | NEW |