| 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 #ifndef CC_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 void SetDeviceScaleFactor(float device_scale_factor); | 249 void SetDeviceScaleFactor(float device_scale_factor); |
| 250 float device_scale_factor() const { return device_scale_factor_; } | 250 float device_scale_factor() const { return device_scale_factor_; } |
| 251 | 251 |
| 252 void UpdateTopControlsState(TopControlsState constraints, | 252 void UpdateTopControlsState(TopControlsState constraints, |
| 253 TopControlsState current, | 253 TopControlsState current, |
| 254 bool animate); | 254 bool animate); |
| 255 | 255 |
| 256 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } | 256 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } |
| 257 | 257 |
| 258 Proxy* proxy() const { return proxy_.get(); } | 258 Proxy* proxy() const { return proxy_.get(); } |
| 259 | |
| 260 AnimationRegistrar* animation_registrar() const { | 259 AnimationRegistrar* animation_registrar() const { |
| 261 return animation_registrar_.get(); | 260 return animation_registrar_.get(); |
| 262 } | 261 } |
| 263 AnimationHost* animation_host() const { return animation_host_.get(); } | 262 AnimationHost* animation_host() const { return animation_host_.get(); } |
| 264 | 263 |
| 265 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 264 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
| 266 | 265 |
| 267 // CreateUIResource creates a resource given a bitmap. The bitmap is | 266 // CreateUIResource creates a resource given a bitmap. The bitmap is |
| 268 // generated via an interface function, which is called when initializing the | 267 // generated via an interface function, which is called when initializing the |
| 269 // resource and when the resource has been lost (due to lost context). The | 268 // resource and when the resource has been lost (due to lost context). The |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 LayerTreeType tree_type, | 333 LayerTreeType tree_type, |
| 335 float opacity) override; | 334 float opacity) override; |
| 336 void SetLayerTransformMutated(int layer_id, | 335 void SetLayerTransformMutated(int layer_id, |
| 337 LayerTreeType tree_type, | 336 LayerTreeType tree_type, |
| 338 const gfx::Transform& transform) override; | 337 const gfx::Transform& transform) override; |
| 339 void SetLayerScrollOffsetMutated( | 338 void SetLayerScrollOffsetMutated( |
| 340 int layer_id, | 339 int layer_id, |
| 341 LayerTreeType tree_type, | 340 LayerTreeType tree_type, |
| 342 const gfx::ScrollOffset& scroll_offset) override; | 341 const gfx::ScrollOffset& scroll_offset) override; |
| 343 | 342 |
| 343 bool ScrollOffsetAnimationWasInterrupted(const Layer* layer) const; |
| 344 bool IsAnimatingFilterProperty(const Layer* layer) const; |
| 345 bool IsAnimatingOpacityProperty(const Layer* layer) const; |
| 346 bool IsAnimatingTransformProperty(const Layer* layer) const; |
| 347 bool HasPotentiallyRunningOpacityAnimation(const Layer* layer) const; |
| 348 bool HasPotentiallyRunningTransformAnimation(const Layer* layer) const; |
| 349 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; |
| 350 bool HasAnyAnimation(const Layer* layer) const; |
| 351 bool HasActiveAnimation(const Layer* layer) const; |
| 352 |
| 344 protected: | 353 protected: |
| 345 explicit LayerTreeHost(InitParams* params); | 354 explicit LayerTreeHost(InitParams* params); |
| 346 void InitializeThreaded( | 355 void InitializeThreaded( |
| 347 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 356 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 348 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 357 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 349 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 358 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 350 void InitializeSingleThreaded( | 359 void InitializeSingleThreaded( |
| 351 LayerTreeHostSingleThreadClient* single_thread_client, | 360 LayerTreeHostSingleThreadClient* single_thread_client, |
| 352 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 361 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 353 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 362 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 486 |
| 478 uint32_t surface_id_namespace_; | 487 uint32_t surface_id_namespace_; |
| 479 uint32_t next_surface_sequence_; | 488 uint32_t next_surface_sequence_; |
| 480 | 489 |
| 481 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 490 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 482 }; | 491 }; |
| 483 | 492 |
| 484 } // namespace cc | 493 } // namespace cc |
| 485 | 494 |
| 486 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 495 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |