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

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

Issue 572353003: Fix RemoveFromScrollTree and RemoveFromClipTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 void AddDrawableDescendants(int num); 496 void AddDrawableDescendants(int num);
497 497
498 void AddDependentNeedsPushProperties(); 498 void AddDependentNeedsPushProperties();
499 void RemoveDependentNeedsPushProperties(); 499 void RemoveDependentNeedsPushProperties();
500 bool parent_should_know_need_push_properties() const { 500 bool parent_should_know_need_push_properties() const {
501 return needs_push_properties() || descendant_needs_push_properties(); 501 return needs_push_properties() || descendant_needs_push_properties();
502 } 502 }
503 503
504 bool IsPropertyChangeAllowed() const; 504 bool IsPropertyChangeAllowed() const;
505 505
506 // If this layer has a scroll parent, it removes |this| from its list of
507 // scroll children.
508 void RemoveFromScrollTree();
509
510 // If this layer has a clip parent, it removes |this| from its list of clip
511 // children.
512 void RemoveFromClipTree();
513
514 void reset_raster_scale_to_unknown() { raster_scale_ = 0.f; } 506 void reset_raster_scale_to_unknown() { raster_scale_ = 0.f; }
515 507
516 // This flag is set when the layer needs to push properties to the impl 508 // This flag is set when the layer needs to push properties to the impl
517 // side. 509 // side.
518 bool needs_push_properties_; 510 bool needs_push_properties_;
519 511
520 // The number of direct children or dependent layers that need to be recursed 512 // The number of direct children or dependent layers that need to be recursed
521 // to in order for them or a descendent of them to push properties to the impl 513 // to in order for them or a descendent of them to push properties to the impl
522 // side. 514 // side.
523 int num_dependents_need_push_properties_; 515 int num_dependents_need_push_properties_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 555
564 // LayerAnimationValueObserver implementation. 556 // LayerAnimationValueObserver implementation.
565 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE; 557 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
566 virtual void OnOpacityAnimated(float opacity) OVERRIDE; 558 virtual void OnOpacityAnimated(float opacity) OVERRIDE;
567 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE; 559 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
568 virtual void OnScrollOffsetAnimated( 560 virtual void OnScrollOffsetAnimated(
569 const gfx::Vector2dF& scroll_offset) OVERRIDE; 561 const gfx::Vector2dF& scroll_offset) OVERRIDE;
570 virtual void OnAnimationWaitingForDeletion() OVERRIDE; 562 virtual void OnAnimationWaitingForDeletion() OVERRIDE;
571 virtual bool IsActive() const OVERRIDE; 563 virtual bool IsActive() const OVERRIDE;
572 564
565 // If this layer has a scroll parent, it removes |this| from its list of
566 // scroll children.
567 void RemoveFromScrollTree();
568
569 // If this layer has a clip parent, it removes |this| from its list of clip
570 // children.
571 void RemoveFromClipTree();
572
573 LayerList children_; 573 LayerList children_;
574 Layer* parent_; 574 Layer* parent_;
575 575
576 // Layer instances have a weak pointer to their LayerTreeHost. 576 // Layer instances have a weak pointer to their LayerTreeHost.
577 // This pointer value is nil when a Layer is not in a tree and is 577 // This pointer value is nil when a Layer is not in a tree and is
578 // updated via SetLayerTreeHost() if a layer moves between trees. 578 // updated via SetLayerTreeHost() if a layer moves between trees.
579 LayerTreeHost* layer_tree_host_; 579 LayerTreeHost* layer_tree_host_;
580 580
581 scoped_refptr<LayerAnimationController> layer_animation_controller_; 581 scoped_refptr<LayerAnimationController> layer_animation_controller_;
582 582
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 DrawProperties<Layer> draw_properties_; 640 DrawProperties<Layer> draw_properties_;
641 641
642 PaintProperties paint_properties_; 642 PaintProperties paint_properties_;
643 643
644 DISALLOW_COPY_AND_ASSIGN(Layer); 644 DISALLOW_COPY_AND_ASSIGN(Layer);
645 }; 645 };
646 646
647 } // namespace cc 647 } // namespace cc
648 648
649 #endif // CC_LAYERS_LAYER_H_ 649 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698