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

Side by Side Diff: cc/layers/layer_impl.h

Issue 2053983003: cc : Move LayerImpl::parent to test properties (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 | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host_impl_unittest.cc » ('J')
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_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void OnOpacityAnimated(float opacity); 95 void OnOpacityAnimated(float opacity);
96 void OnTransformAnimated(const gfx::Transform& transform); 96 void OnTransformAnimated(const gfx::Transform& transform);
97 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); 97 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset);
98 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); 98 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating);
99 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); 99 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation);
100 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); 100 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating);
101 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); 101 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation);
102 bool IsActive() const; 102 bool IsActive() const;
103 103
104 // Tree structure. 104 // Tree structure.
105 LayerImpl* parent() { return parent_; }
106 void AddChild(std::unique_ptr<LayerImpl> child); 105 void AddChild(std::unique_ptr<LayerImpl> child);
107 std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child); 106 std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child);
108 void SetParent(LayerImpl* parent);
109 107
110 void DistributeScroll(ScrollState* scroll_state); 108 void DistributeScroll(ScrollState* scroll_state);
111 void ApplyScroll(ScrollState* scroll_state); 109 void ApplyScroll(ScrollState* scroll_state);
112 110
113 void set_property_tree_sequence_number(int sequence_number) {} 111 void set_property_tree_sequence_number(int sequence_number) {}
114 112
115 void SetTransformTreeIndex(int index); 113 void SetTransformTreeIndex(int index);
116 int transform_tree_index() const { return transform_tree_index_; } 114 int transform_tree_index() const { return transform_tree_index_; }
117 115
118 void SetClipTreeIndex(int index); 116 void SetClipTreeIndex(int index);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 SkColor color, 525 SkColor color,
528 float width) const; 526 float width) const;
529 527
530 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; 528 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const;
531 529
532 private: 530 private:
533 void ValidateQuadResourcesInternal(DrawQuad* quad) const; 531 void ValidateQuadResourcesInternal(DrawQuad* quad) const;
534 532
535 virtual const char* LayerTypeAsString() const; 533 virtual const char* LayerTypeAsString() const;
536 534
537 // Properties internal to LayerImpl
538 LayerImpl* parent_;
539
540 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to 535 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to
541 // confirm newly assigned layer is still the previous one 536 // confirm newly assigned layer is still the previous one
542 int mask_layer_id_; 537 int mask_layer_id_;
543 LayerImpl* mask_layer_; 538 LayerImpl* mask_layer_;
544 int replica_layer_id_; // ditto 539 int replica_layer_id_; // ditto
545 LayerImpl* replica_layer_; 540 LayerImpl* replica_layer_;
546 int layer_id_; 541 int layer_id_;
547 LayerTreeImpl* layer_tree_impl_; 542 LayerTreeImpl* layer_tree_impl_;
548 543
549 std::unique_ptr<LayerImplTestProperties> test_properties_; 544 std::unique_ptr<LayerImplTestProperties> test_properties_;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 628
634 bool scrolls_drawn_descendant_; 629 bool scrolls_drawn_descendant_;
635 bool has_will_change_transform_hint_; 630 bool has_will_change_transform_hint_;
636 631
637 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 632 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
638 }; 633 };
639 634
640 } // namespace cc 635 } // namespace cc
641 636
642 #endif // CC_LAYERS_LAYER_IMPL_H_ 637 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698