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

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

Issue 1752993002: cc : Delete LayerImpl::NoteLayerPropertyChangedForSubtree (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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PROPERTY_TREE_H_ 5 #ifndef CC_TREES_PROPERTY_TREE_H_
6 #define CC_TREES_PROPERTY_TREE_H_ 6 #define CC_TREES_PROPERTY_TREE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 EffectNodeData(const EffectNodeData& other); 251 EffectNodeData(const EffectNodeData& other);
252 252
253 float opacity; 253 float opacity;
254 float screen_space_opacity; 254 float screen_space_opacity;
255 255
256 bool has_render_surface; 256 bool has_render_surface;
257 bool has_copy_request; 257 bool has_copy_request;
258 bool has_background_filters; 258 bool has_background_filters;
259 bool is_drawn; 259 bool is_drawn;
260 bool has_animated_opacity; 260 bool has_animated_opacity;
261 // We need to track changes to opacity on the compositor to compute damage 261 // We need to track changes to effects on the compositor to compute damage
262 // rect. 262 // rect.
263 bool opacity_changed; 263 bool effect_changed;
264 int num_copy_requests_in_subtree; 264 int num_copy_requests_in_subtree;
265 int transform_id; 265 int transform_id;
266 int clip_id; 266 int clip_id;
267 267
268 bool operator==(const EffectNodeData& other) const; 268 bool operator==(const EffectNodeData& other) const;
269 269
270 void ToProtobuf(proto::TreeNode* proto) const; 270 void ToProtobuf(proto::TreeNode* proto) const;
271 void FromProtobuf(const proto::TreeNode& proto); 271 void FromProtobuf(const proto::TreeNode& proto);
272 }; 272 };
273 273
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 void ToProtobuf(proto::PropertyTree* proto) const; 521 void ToProtobuf(proto::PropertyTree* proto) const;
522 void FromProtobuf(const proto::PropertyTree& proto); 522 void FromProtobuf(const proto::PropertyTree& proto);
523 }; 523 };
524 524
525 class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> { 525 class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
526 public: 526 public:
527 bool operator==(const EffectTree& other) const; 527 bool operator==(const EffectTree& other) const;
528 528
529 void UpdateEffects(int id); 529 void UpdateEffects(int id);
530 530
531 void UpdateOpacityChanged(EffectNode* node, EffectNode* parent_node); 531 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node);
532 532
533 void ClearCopyRequests(); 533 void ClearCopyRequests();
534 534
535 bool ContributesToDrawnSurface(int id); 535 bool ContributesToDrawnSurface(int id);
536 536
537 void ResetChangeTracking(); 537 void ResetChangeTracking();
538 538
539 void ToProtobuf(proto::PropertyTree* proto) const; 539 void ToProtobuf(proto::PropertyTree* proto) const;
540 void FromProtobuf(const proto::PropertyTree& proto); 540 void FromProtobuf(const proto::PropertyTree& proto);
541 541
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 EffectTree effect_tree; 580 EffectTree effect_tree;
581 ClipTree clip_tree; 581 ClipTree clip_tree;
582 ScrollTree scroll_tree; 582 ScrollTree scroll_tree;
583 bool needs_rebuild; 583 bool needs_rebuild;
584 bool non_root_surfaces_enabled; 584 bool non_root_surfaces_enabled;
585 // Change tracking done on property trees needs to be preserved across commits 585 // Change tracking done on property trees needs to be preserved across commits
586 // (when they are not rebuild). We cache a global bool which stores whether 586 // (when they are not rebuild). We cache a global bool which stores whether
587 // we did any change tracking so that we can skip copying the change status 587 // we did any change tracking so that we can skip copying the change status
588 // between property trees when this bool is false. 588 // between property trees when this bool is false.
589 bool changed; 589 bool changed;
590 // We cache a global bool for full tree damages to avoid walking the entire
591 // tree.
592 bool full_tree_damaged;
590 int sequence_number; 593 int sequence_number;
591 594
592 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); 595 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta);
593 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); 596 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta);
594 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta); 597 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta);
595 void PushChangeTrackingTo(PropertyTrees* tree); 598 void PushChangeTrackingTo(PropertyTrees* tree);
596 599
597 gfx::Vector2dF inner_viewport_container_bounds_delta() const { 600 gfx::Vector2dF inner_viewport_container_bounds_delta() const {
598 return inner_viewport_container_bounds_delta_; 601 return inner_viewport_container_bounds_delta_;
599 } 602 }
600 603
601 gfx::Vector2dF outer_viewport_container_bounds_delta() const { 604 gfx::Vector2dF outer_viewport_container_bounds_delta() const {
602 return outer_viewport_container_bounds_delta_; 605 return outer_viewport_container_bounds_delta_;
603 } 606 }
604 607
605 gfx::Vector2dF inner_viewport_scroll_bounds_delta() const { 608 gfx::Vector2dF inner_viewport_scroll_bounds_delta() const {
606 return inner_viewport_scroll_bounds_delta_; 609 return inner_viewport_scroll_bounds_delta_;
607 } 610 }
608 611
609 private: 612 private:
610 gfx::Vector2dF inner_viewport_container_bounds_delta_; 613 gfx::Vector2dF inner_viewport_container_bounds_delta_;
611 gfx::Vector2dF outer_viewport_container_bounds_delta_; 614 gfx::Vector2dF outer_viewport_container_bounds_delta_;
612 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; 615 gfx::Vector2dF inner_viewport_scroll_bounds_delta_;
613 }; 616 };
614 617
615 } // namespace cc 618 } // namespace cc
616 619
617 #endif // CC_TREES_PROPERTY_TREE_H_ 620 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698