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

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

Issue 2053193002: cc : Move LayerImpl::children 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/layers/layer_impl.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_; } 105 LayerImpl* parent() { return parent_; }
106 LayerImplList& children() { return children_; }
107 LayerImpl* child_at(size_t index) const { return children_[index]; }
108 void AddChild(std::unique_ptr<LayerImpl> child); 106 void AddChild(std::unique_ptr<LayerImpl> child);
109 std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child); 107 std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child);
110 void SetParent(LayerImpl* parent); 108 void SetParent(LayerImpl* parent);
111 109
112 void DistributeScroll(ScrollState* scroll_state); 110 void DistributeScroll(ScrollState* scroll_state);
113 void ApplyScroll(ScrollState* scroll_state); 111 void ApplyScroll(ScrollState* scroll_state);
114 112
115 void set_property_tree_sequence_number(int sequence_number) {} 113 void set_property_tree_sequence_number(int sequence_number) {}
116 114
117 void SetTransformTreeIndex(int index); 115 void SetTransformTreeIndex(int index);
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 bool TransformAnimationBoundsForBox(const gfx::BoxF& box, 414 bool TransformAnimationBoundsForBox(const gfx::BoxF& box,
417 gfx::BoxF* bounds) const; 415 gfx::BoxF* bounds) const;
418 416
419 // Note this rect is in layer space (not content space). 417 // Note this rect is in layer space (not content space).
420 void SetUpdateRect(const gfx::Rect& update_rect); 418 void SetUpdateRect(const gfx::Rect& update_rect);
421 const gfx::Rect& update_rect() const { return update_rect_; } 419 const gfx::Rect& update_rect() const { return update_rect_; }
422 420
423 void AddDamageRect(const gfx::Rect& damage_rect); 421 void AddDamageRect(const gfx::Rect& damage_rect);
424 const gfx::Rect& damage_rect() const { return damage_rect_; } 422 const gfx::Rect& damage_rect() const { return damage_rect_; }
425 423
426 virtual std::unique_ptr<base::DictionaryValue> LayerTreeAsJson() const; 424 virtual std::unique_ptr<base::DictionaryValue> LayerTreeAsJson();
427 425
428 bool LayerPropertyChanged() const; 426 bool LayerPropertyChanged() const;
429 427
430 void ResetChangeTracking(); 428 void ResetChangeTracking();
431 429
432 virtual SimpleEnclosedRegion VisibleOpaqueRegion() const; 430 virtual SimpleEnclosedRegion VisibleOpaqueRegion() const;
433 431
434 virtual void DidBecomeActive() {} 432 virtual void DidBecomeActive() {}
435 433
436 virtual void DidBeginTracing(); 434 virtual void DidBeginTracing();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 529
532 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; 530 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const;
533 531
534 private: 532 private:
535 void ValidateQuadResourcesInternal(DrawQuad* quad) const; 533 void ValidateQuadResourcesInternal(DrawQuad* quad) const;
536 534
537 virtual const char* LayerTypeAsString() const; 535 virtual const char* LayerTypeAsString() const;
538 536
539 // Properties internal to LayerImpl 537 // Properties internal to LayerImpl
540 LayerImpl* parent_; 538 LayerImpl* parent_;
541 LayerImplList children_;
542 539
543 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to 540 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to
544 // confirm newly assigned layer is still the previous one 541 // confirm newly assigned layer is still the previous one
545 int mask_layer_id_; 542 int mask_layer_id_;
546 LayerImpl* mask_layer_; 543 LayerImpl* mask_layer_;
547 int replica_layer_id_; // ditto 544 int replica_layer_id_; // ditto
548 LayerImpl* replica_layer_; 545 LayerImpl* replica_layer_;
549 int layer_id_; 546 int layer_id_;
550 LayerTreeImpl* layer_tree_impl_; 547 LayerTreeImpl* layer_tree_impl_;
551 548
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 633
637 bool scrolls_drawn_descendant_; 634 bool scrolls_drawn_descendant_;
638 bool has_will_change_transform_hint_; 635 bool has_will_change_transform_hint_;
639 636
640 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 637 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
641 }; 638 };
642 639
643 } // namespace cc 640 } // namespace cc
644 641
645 #endif // CC_LAYERS_LAYER_IMPL_H_ 642 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698