| 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/layer_tree_host_in_process.h" | 5 #include "cc/trees/layer_tree_host_in_process.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 bool animate) { | 782 bool animate) { |
| 783 // Browser controls are only used in threaded mode. | 783 // Browser controls are only used in threaded mode. |
| 784 DCHECK(IsThreaded()); | 784 DCHECK(IsThreaded()); |
| 785 proxy_->UpdateBrowserControlsState(constraints, current, animate); | 785 proxy_->UpdateBrowserControlsState(constraints, current, animate); |
| 786 } | 786 } |
| 787 | 787 |
| 788 void LayerTreeHostInProcess::AnimateLayers(base::TimeTicks monotonic_time) { | 788 void LayerTreeHostInProcess::AnimateLayers(base::TimeTicks monotonic_time) { |
| 789 MutatorHost* mutator_host = layer_tree_->mutator_host(); | 789 MutatorHost* mutator_host = layer_tree_->mutator_host(); |
| 790 std::unique_ptr<MutatorEvents> events = mutator_host->CreateEvents(); | 790 std::unique_ptr<MutatorEvents> events = mutator_host->CreateEvents(); |
| 791 | 791 |
| 792 if (mutator_host->AnimateLayers(monotonic_time)) | 792 if (mutator_host->TickAnimations(monotonic_time)) |
| 793 mutator_host->UpdateAnimationState(true, events.get()); | 793 mutator_host->UpdateAnimationState(true, events.get()); |
| 794 | 794 |
| 795 if (!events->IsEmpty()) | 795 if (!events->IsEmpty()) |
| 796 layer_tree_->property_trees()->needs_rebuild = true; | 796 layer_tree_->property_trees()->needs_rebuild = true; |
| 797 } | 797 } |
| 798 | 798 |
| 799 int LayerTreeHostInProcess::ScheduleMicroBenchmark( | 799 int LayerTreeHostInProcess::ScheduleMicroBenchmark( |
| 800 const std::string& benchmark_name, | 800 const std::string& benchmark_name, |
| 801 std::unique_ptr<base::Value> value, | 801 std::unique_ptr<base::Value> value, |
| 802 const MicroBenchmark::DoneCallback& callback) { | 802 const MicroBenchmark::DoneCallback& callback) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 821 return compositor_mode_ == CompositorMode::SINGLE_THREADED; | 821 return compositor_mode_ == CompositorMode::SINGLE_THREADED; |
| 822 } | 822 } |
| 823 | 823 |
| 824 bool LayerTreeHostInProcess::IsThreaded() const { | 824 bool LayerTreeHostInProcess::IsThreaded() const { |
| 825 DCHECK(compositor_mode_ != CompositorMode::THREADED || | 825 DCHECK(compositor_mode_ != CompositorMode::THREADED || |
| 826 task_runner_provider_->HasImplThread()); | 826 task_runner_provider_->HasImplThread()); |
| 827 return compositor_mode_ == CompositorMode::THREADED; | 827 return compositor_mode_ == CompositorMode::THREADED; |
| 828 } | 828 } |
| 829 | 829 |
| 830 } // namespace cc | 830 } // namespace cc |
| OLD | NEW |