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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 PropertyTrees* property_trees = layer_tree_->property_trees(); | 352 PropertyTrees* property_trees = layer_tree_->property_trees(); |
353 property_trees->scroll_tree.SetScrollOffset( | 353 property_trees->scroll_tree.SetScrollOffset( |
354 layer_id, gfx::ScrollOffsetWithDelta( | 354 layer_id, gfx::ScrollOffsetWithDelta( |
355 layer_tree_->LayerById(layer_id)->scroll_offset(), | 355 layer_tree_->LayerById(layer_id)->scroll_offset(), |
356 scroll_delta)); | 356 scroll_delta)); |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 // This must happen after synchronizing property trees and after pushing | 360 // This must happen after synchronizing property trees and after pushing |
361 // properties, which updates the clobber_active_value flag. | 361 // properties, which updates the clobber_active_value flag. |
362 sync_tree->UpdatePropertyTreeScrollOffset(layer_tree_->property_trees()); | 362 sync_tree->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( |
| 363 layer_tree_->property_trees(), sync_tree); |
363 | 364 |
364 // This must happen after synchronizing property trees and after push | 365 // This must happen after synchronizing property trees and after push |
365 // properties, which updates property tree indices, but before animation | 366 // properties, which updates property tree indices, but before animation |
366 // host pushes properties as animation host push properties can change | 367 // host pushes properties as animation host push properties can change |
367 // Animation::InEffect and we want the old InEffect value for updating | 368 // Animation::InEffect and we want the old InEffect value for updating |
368 // property tree scrolling and animation. | 369 // property tree scrolling and animation. |
369 sync_tree->UpdatePropertyTreeScrollingAndAnimationFromMainThread(); | 370 sync_tree->UpdatePropertyTreeScrollingAndAnimationFromMainThread(); |
370 | 371 |
371 TRACE_EVENT0("cc", "LayerTreeHostInProcess::AnimationHost::PushProperties"); | 372 TRACE_EVENT0("cc", "LayerTreeHostInProcess::AnimationHost::PushProperties"); |
372 DCHECK(host_impl->mutator_host()); | 373 DCHECK(host_impl->mutator_host()); |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 return compositor_mode_ == CompositorMode::SINGLE_THREADED; | 853 return compositor_mode_ == CompositorMode::SINGLE_THREADED; |
853 } | 854 } |
854 | 855 |
855 bool LayerTreeHostInProcess::IsThreaded() const { | 856 bool LayerTreeHostInProcess::IsThreaded() const { |
856 DCHECK(compositor_mode_ != CompositorMode::THREADED || | 857 DCHECK(compositor_mode_ != CompositorMode::THREADED || |
857 task_runner_provider_->HasImplThread()); | 858 task_runner_provider_->HasImplThread()); |
858 return compositor_mode_ == CompositorMode::THREADED; | 859 return compositor_mode_ == CompositorMode::THREADED; |
859 } | 860 } |
860 | 861 |
861 } // namespace cc | 862 } // namespace cc |
OLD | NEW |