| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 PropertyTrees* property_trees() { return &property_trees_; } | 350 PropertyTrees* property_trees() { return &property_trees_; } |
| 351 bool needs_meta_info_recomputation() { | 351 bool needs_meta_info_recomputation() { |
| 352 return needs_meta_info_recomputation_; | 352 return needs_meta_info_recomputation_; |
| 353 } | 353 } |
| 354 | 354 |
| 355 void RecordFrameTimingEvents( | 355 void RecordFrameTimingEvents( |
| 356 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 356 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 357 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events); | 357 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events); |
| 358 | 358 |
| 359 Layer* LayerById(int id) const; | 359 Layer* LayerById(int id) const; |
| 360 |
| 361 void AddLayerShouldPushProperties(Layer* layer); |
| 362 void RemoveLayerShouldPushProperties(Layer* layer); |
| 363 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); |
| 364 bool LayerNeedsPushPropertiesForTesting(Layer* layer); |
| 365 |
| 360 void RegisterLayer(Layer* layer); | 366 void RegisterLayer(Layer* layer); |
| 361 void UnregisterLayer(Layer* layer); | 367 void UnregisterLayer(Layer* layer); |
| 362 // LayerTreeMutatorsClient implementation. | 368 // LayerTreeMutatorsClient implementation. |
| 363 bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override; | 369 bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override; |
| 364 void SetMutatorsNeedCommit() override; | 370 void SetMutatorsNeedCommit() override; |
| 365 void SetMutatorsNeedRebuildPropertyTrees() override; | 371 void SetMutatorsNeedRebuildPropertyTrees() override; |
| 366 void SetLayerFilterMutated(int layer_id, | 372 void SetLayerFilterMutated(int layer_id, |
| 367 LayerTreeType tree_type, | 373 LayerTreeType tree_type, |
| 368 const FilterOperations& filters) override; | 374 const FilterOperations& filters) override; |
| 369 void SetLayerOpacityMutated(int layer_id, | 375 void SetLayerOpacityMutated(int layer_id, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 394 bool AnimationStartScale(const Layer* layer, float* start_scale) const; | 400 bool AnimationStartScale(const Layer* layer, float* start_scale) const; |
| 395 bool HasAnyAnimationTargetingProperty(const Layer* layer, | 401 bool HasAnyAnimationTargetingProperty(const Layer* layer, |
| 396 TargetProperty::Type property) const; | 402 TargetProperty::Type property) const; |
| 397 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; | 403 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; |
| 398 bool HasAnyAnimation(const Layer* layer) const; | 404 bool HasAnyAnimation(const Layer* layer) const; |
| 399 bool HasActiveAnimationForTesting(const Layer* layer) const; | 405 bool HasActiveAnimationForTesting(const Layer* layer) const; |
| 400 | 406 |
| 401 // Serializes the parts of this LayerTreeHost that is needed for a commit to a | 407 // Serializes the parts of this LayerTreeHost that is needed for a commit to a |
| 402 // protobuf message. Not all members are serialized as they are not helpful | 408 // protobuf message. Not all members are serialized as they are not helpful |
| 403 // for remote usage. | 409 // for remote usage. |
| 404 void ToProtobufForCommit(proto::LayerTreeHost* proto) const; | 410 void ToProtobufForCommit(proto::LayerTreeHost* proto); |
| 405 | 411 |
| 406 // Deserializes the protobuf into this LayerTreeHost before a commit. The | 412 // Deserializes the protobuf into this LayerTreeHost before a commit. The |
| 407 // expected input is a serialized remote LayerTreeHost. After deserializing | 413 // expected input is a serialized remote LayerTreeHost. After deserializing |
| 408 // the protobuf, the normal commit-flow should continue. | 414 // the protobuf, the normal commit-flow should continue. |
| 409 void FromProtobufForCommit(const proto::LayerTreeHost& proto); | 415 void FromProtobufForCommit(const proto::LayerTreeHost& proto); |
| 410 | 416 |
| 411 bool IsSingleThreaded() const; | 417 bool IsSingleThreaded() const; |
| 412 bool IsThreaded() const; | 418 bool IsThreaded() const; |
| 413 bool IsRemoteServer() const; | 419 bool IsRemoteServer() const; |
| 414 bool IsRemoteClient() const; | 420 bool IsRemoteClient() const; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 579 |
| 574 ImageSerializationProcessor* image_serialization_processor_; | 580 ImageSerializationProcessor* image_serialization_processor_; |
| 575 | 581 |
| 576 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; | 582 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; |
| 577 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 583 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 578 | 584 |
| 579 PropertyTrees property_trees_; | 585 PropertyTrees property_trees_; |
| 580 | 586 |
| 581 using LayerIdMap = std::unordered_map<int, Layer*>; | 587 using LayerIdMap = std::unordered_map<int, Layer*>; |
| 582 LayerIdMap layer_id_map_; | 588 LayerIdMap layer_id_map_; |
| 589 // Set of layers that need to push properties. |
| 590 std::unordered_set<Layer*> layers_that_should_push_properties_; |
| 583 | 591 |
| 584 uint32_t surface_id_namespace_; | 592 uint32_t surface_id_namespace_; |
| 585 uint32_t next_surface_sequence_; | 593 uint32_t next_surface_sequence_; |
| 586 | 594 |
| 587 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 595 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 588 }; | 596 }; |
| 589 | 597 |
| 590 } // namespace cc | 598 } // namespace cc |
| 591 | 599 |
| 592 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 600 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |