Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1190)

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 1808373002: cc : Make tree synchronization independent of layer tree hierarchy (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 PropertyTrees* property_trees() { return &property_trees_; } 355 PropertyTrees* property_trees() { return &property_trees_; }
356 bool needs_meta_info_recomputation() { 356 bool needs_meta_info_recomputation() {
357 return needs_meta_info_recomputation_; 357 return needs_meta_info_recomputation_;
358 } 358 }
359 359
360 void RecordFrameTimingEvents( 360 void RecordFrameTimingEvents(
361 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, 361 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
362 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events); 362 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events);
363 363
364 Layer* LayerById(int id) const; 364 Layer* LayerById(int id) const;
365
366 void AddLayerShouldPushProperties(Layer* layer);
367 void RemoveLayerShouldPushProperties(Layer* layer);
368 std::unordered_set<Layer*>& LayersThatShouldPushProperties();
369 bool LayerNeedsPushPropertiesForTesting(Layer* layer);
370
365 void RegisterLayer(Layer* layer); 371 void RegisterLayer(Layer* layer);
366 void UnregisterLayer(Layer* layer); 372 void UnregisterLayer(Layer* layer);
367 // LayerTreeMutatorsClient implementation. 373 // LayerTreeMutatorsClient implementation.
368 bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override; 374 bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override;
369 void SetMutatorsNeedCommit() override; 375 void SetMutatorsNeedCommit() override;
370 void SetMutatorsNeedRebuildPropertyTrees() override; 376 void SetMutatorsNeedRebuildPropertyTrees() override;
371 void SetLayerFilterMutated(int layer_id, 377 void SetLayerFilterMutated(int layer_id,
372 LayerTreeType tree_type, 378 LayerTreeType tree_type,
373 const FilterOperations& filters) override; 379 const FilterOperations& filters) override;
374 void SetLayerOpacityMutated(int layer_id, 380 void SetLayerOpacityMutated(int layer_id,
(...skipping 24 matching lines...) Expand all
399 bool AnimationStartScale(const Layer* layer, float* start_scale) const; 405 bool AnimationStartScale(const Layer* layer, float* start_scale) const;
400 bool HasAnyAnimationTargetingProperty(const Layer* layer, 406 bool HasAnyAnimationTargetingProperty(const Layer* layer,
401 TargetProperty::Type property) const; 407 TargetProperty::Type property) const;
402 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; 408 bool AnimationsPreserveAxisAlignment(const Layer* layer) const;
403 bool HasAnyAnimation(const Layer* layer) const; 409 bool HasAnyAnimation(const Layer* layer) const;
404 bool HasActiveAnimation(const Layer* layer) const; 410 bool HasActiveAnimation(const Layer* layer) const;
405 411
406 // Serializes the parts of this LayerTreeHost that is needed for a commit to a 412 // Serializes the parts of this LayerTreeHost that is needed for a commit to a
407 // protobuf message. Not all members are serialized as they are not helpful 413 // protobuf message. Not all members are serialized as they are not helpful
408 // for remote usage. 414 // for remote usage.
409 void ToProtobufForCommit(proto::LayerTreeHost* proto) const; 415 void ToProtobufForCommit(proto::LayerTreeHost* proto);
410 416
411 // Deserializes the protobuf into this LayerTreeHost before a commit. The 417 // Deserializes the protobuf into this LayerTreeHost before a commit. The
412 // expected input is a serialized remote LayerTreeHost. After deserializing 418 // expected input is a serialized remote LayerTreeHost. After deserializing
413 // the protobuf, the normal commit-flow should continue. 419 // the protobuf, the normal commit-flow should continue.
414 void FromProtobufForCommit(const proto::LayerTreeHost& proto); 420 void FromProtobufForCommit(const proto::LayerTreeHost& proto);
415 421
416 bool IsSingleThreaded() const; 422 bool IsSingleThreaded() const;
417 bool IsThreaded() const; 423 bool IsThreaded() const;
418 bool IsRemoteServer() const; 424 bool IsRemoteServer() const;
419 bool IsRemoteClient() const; 425 bool IsRemoteClient() const;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 585
580 ImageSerializationProcessor* image_serialization_processor_; 586 ImageSerializationProcessor* image_serialization_processor_;
581 587
582 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; 588 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_;
583 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 589 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
584 590
585 PropertyTrees property_trees_; 591 PropertyTrees property_trees_;
586 592
587 using LayerIdMap = std::unordered_map<int, Layer*>; 593 using LayerIdMap = std::unordered_map<int, Layer*>;
588 LayerIdMap layer_id_map_; 594 LayerIdMap layer_id_map_;
595 // Set of layers that need to push properties.
596 std::unordered_set<Layer*> layers_that_should_push_properties_;
589 597
590 uint32_t surface_id_namespace_; 598 uint32_t surface_id_namespace_;
591 uint32_t next_surface_sequence_; 599 uint32_t next_surface_sequence_;
592 600
593 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 601 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
594 }; 602 };
595 603
596 } // namespace cc 604 } // namespace cc
597 605
598 #endif // CC_TREES_LAYER_TREE_HOST_H_ 606 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698