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

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

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 5 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/layers/layer.cc ('k') | cc/layers/layer_impl.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_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 // Interactions with attached animations. 95 // Interactions with attached animations.
96 gfx::ScrollOffset ScrollOffsetForAnimation() const; 96 gfx::ScrollOffset ScrollOffsetForAnimation() const;
97 void OnFilterAnimated(const FilterOperations& filters); 97 void OnFilterAnimated(const FilterOperations& filters);
98 void OnOpacityAnimated(float opacity); 98 void OnOpacityAnimated(float opacity);
99 void OnTransformAnimated(const gfx::Transform& transform); 99 void OnTransformAnimated(const gfx::Transform& transform);
100 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); 100 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset);
101 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); 101 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating);
102 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); 102 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation);
103 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); 103 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating);
104 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); 104 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation);
105 void OnFilterIsCurrentlyAnimatingChanged(bool is_currently_animating);
106 void OnFilterIsPotentiallyAnimatingChanged(bool has_potential_animation);
105 bool IsActive() const; 107 bool IsActive() const;
106 108
107 void DistributeScroll(ScrollState* scroll_state); 109 void DistributeScroll(ScrollState* scroll_state);
108 void ApplyScroll(ScrollState* scroll_state); 110 void ApplyScroll(ScrollState* scroll_state);
109 111
110 void set_property_tree_sequence_number(int sequence_number) {} 112 void set_property_tree_sequence_number(int sequence_number) {}
111 113
112 void SetTransformTreeIndex(int index); 114 void SetTransformTreeIndex(int index);
113 int transform_tree_index() const { return transform_tree_index_; } 115 int transform_tree_index() const { return transform_tree_index_; }
114 116
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return test_properties_.get(); 187 return test_properties_.get();
186 } 188 }
187 189
188 void SetBackgroundColor(SkColor background_color); 190 void SetBackgroundColor(SkColor background_color);
189 SkColor background_color() const { return background_color_; } 191 SkColor background_color() const { return background_color_; }
190 void SetSafeOpaqueBackgroundColor(SkColor background_color); 192 void SetSafeOpaqueBackgroundColor(SkColor background_color);
191 // If contents_opaque(), return an opaque color else return a 193 // If contents_opaque(), return an opaque color else return a
192 // non-opaque color. Tries to return background_color(), if possible. 194 // non-opaque color. Tries to return background_color(), if possible.
193 SkColor SafeOpaqueBackgroundColor() const; 195 SkColor SafeOpaqueBackgroundColor() const;
194 196
195 void SetFilters(const FilterOperations& filters);
196 const FilterOperations& filters() const { return filters_; }
197 bool FilterIsAnimating() const; 197 bool FilterIsAnimating() const;
198 bool HasPotentiallyRunningFilterAnimation() const; 198 bool HasPotentiallyRunningFilterAnimation() const;
199 199
200 void SetMasksToBounds(bool masks_to_bounds); 200 void SetMasksToBounds(bool masks_to_bounds);
201 bool masks_to_bounds() const { return masks_to_bounds_; } 201 bool masks_to_bounds() const { return masks_to_bounds_; }
202 202
203 void SetContentsOpaque(bool opaque); 203 void SetContentsOpaque(bool opaque);
204 bool contents_opaque() const { return contents_opaque_; } 204 bool contents_opaque() const { return contents_opaque_; }
205 205
206 float Opacity() const; 206 float Opacity() const;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 SkXfermode::Mode draw_blend_mode_; 546 SkXfermode::Mode draw_blend_mode_;
547 gfx::PointF position_; 547 gfx::PointF position_;
548 gfx::Transform transform_; 548 gfx::Transform transform_;
549 549
550 gfx::Rect clip_rect_in_target_space_; 550 gfx::Rect clip_rect_in_target_space_;
551 int transform_tree_index_; 551 int transform_tree_index_;
552 int effect_tree_index_; 552 int effect_tree_index_;
553 int clip_tree_index_; 553 int clip_tree_index_;
554 int scroll_tree_index_; 554 int scroll_tree_index_;
555 555
556 FilterOperations filters_;
557
558 protected: 556 protected:
559 friend class TreeSynchronizer; 557 friend class TreeSynchronizer;
560 558
561 // Layers that share a sorting context id will be sorted together in 3d 559 // Layers that share a sorting context id will be sorted together in 3d
562 // space. 0 is a special value that means this layer will not be sorted and 560 // space. 0 is a special value that means this layer will not be sorted and
563 // will be drawn in paint order. 561 // will be drawn in paint order.
564 int sorting_context_id_; 562 int sorting_context_id_;
565 563
566 DrawMode current_draw_mode_; 564 DrawMode current_draw_mode_;
567 565
(...skipping 22 matching lines...) Expand all
590 bool scrolls_drawn_descendant_ : 1; 588 bool scrolls_drawn_descendant_ : 1;
591 bool has_will_change_transform_hint_ : 1; 589 bool has_will_change_transform_hint_ : 1;
592 bool needs_push_properties_ : 1; 590 bool needs_push_properties_ : 1;
593 591
594 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 592 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
595 }; 593 };
596 594
597 } // namespace cc 595 } // namespace cc
598 596
599 #endif // CC_LAYERS_LAYER_IMPL_H_ 597 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698