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

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

Issue 2049063002: Revert of Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 PropertyTrees* property_trees() { return &property_trees_; } 342 PropertyTrees* property_trees() { return &property_trees_; }
343 bool needs_meta_info_recomputation() { 343 bool needs_meta_info_recomputation() {
344 return needs_meta_info_recomputation_; 344 return needs_meta_info_recomputation_;
345 } 345 }
346 346
347 void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator); 347 void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator);
348 348
349 Layer* LayerById(int id) const; 349 Layer* LayerById(int id) const;
350 350
351 Layer* LayerByElementId(ElementId element_id) const;
352 void AddToElementMap(Layer* layer);
353 void RemoveFromElementMap(Layer* layer);
354
355 void AddLayerShouldPushProperties(Layer* layer); 351 void AddLayerShouldPushProperties(Layer* layer);
356 void RemoveLayerShouldPushProperties(Layer* layer); 352 void RemoveLayerShouldPushProperties(Layer* layer);
357 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); 353 std::unordered_set<Layer*>& LayersThatShouldPushProperties();
358 bool LayerNeedsPushPropertiesForTesting(Layer* layer); 354 bool LayerNeedsPushPropertiesForTesting(Layer* layer);
359 355
360 void RegisterLayer(Layer* layer); 356 void RegisterLayer(Layer* layer);
361 void UnregisterLayer(Layer* layer); 357 void UnregisterLayer(Layer* layer);
362 // MutatorHostClient implementation. 358 // MutatorHostClient implementation.
363 bool IsElementInList(ElementId element_id, 359 bool IsElementInList(ElementId element_id,
364 ElementListType list_type) const override; 360 ElementListType list_type) const override;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // expected input is a serialized remote LayerTreeHost. After deserializing 414 // expected input is a serialized remote LayerTreeHost. After deserializing
419 // the protobuf, the normal commit-flow should continue. 415 // the protobuf, the normal commit-flow should continue.
420 void FromProtobufForCommit(const proto::LayerTreeHost& proto); 416 void FromProtobufForCommit(const proto::LayerTreeHost& proto);
421 417
422 bool IsSingleThreaded() const; 418 bool IsSingleThreaded() const;
423 bool IsThreaded() const; 419 bool IsThreaded() const;
424 bool IsRemoteServer() const; 420 bool IsRemoteServer() const;
425 bool IsRemoteClient() const; 421 bool IsRemoteClient() const;
426 void BuildPropertyTreesForTesting(); 422 void BuildPropertyTreesForTesting();
427 423
428 void SetElementIdsForTesting();
429
430 ImageSerializationProcessor* image_serialization_processor() const { 424 ImageSerializationProcessor* image_serialization_processor() const {
431 return image_serialization_processor_; 425 return image_serialization_processor_;
432 } 426 }
433 427
434 void ReportFixedRasterScaleUseCounters( 428 void ReportFixedRasterScaleUseCounters(
435 bool has_fixed_raster_scale_blurry_content, 429 bool has_fixed_raster_scale_blurry_content,
436 bool has_fixed_raster_scale_potential_performance_regression); 430 bool has_fixed_raster_scale_potential_performance_regression);
437 431
438 protected: 432 protected:
439 LayerTreeHost(InitParams* params, CompositorMode mode); 433 LayerTreeHost(InitParams* params, CompositorMode mode);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 584
591 ImageSerializationProcessor* image_serialization_processor_; 585 ImageSerializationProcessor* image_serialization_processor_;
592 586
593 std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_; 587 std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_;
594 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 588 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
595 589
596 PropertyTrees property_trees_; 590 PropertyTrees property_trees_;
597 591
598 using LayerIdMap = std::unordered_map<int, Layer*>; 592 using LayerIdMap = std::unordered_map<int, Layer*>;
599 LayerIdMap layer_id_map_; 593 LayerIdMap layer_id_map_;
600
601 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>;
602 ElementLayersMap element_layers_map_;
603
604 // Set of layers that need to push properties. 594 // Set of layers that need to push properties.
605 std::unordered_set<Layer*> layers_that_should_push_properties_; 595 std::unordered_set<Layer*> layers_that_should_push_properties_;
606 596
607 uint32_t surface_id_namespace_; 597 uint32_t surface_id_namespace_;
608 uint32_t next_surface_sequence_; 598 uint32_t next_surface_sequence_;
609 599
610 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 600 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
611 }; 601 };
612 602
613 } // namespace cc 603 } // namespace cc
614 604
615 #endif // CC_TREES_LAYER_TREE_HOST_H_ 605 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698