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

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

Issue 2018833002: cc : Delete LayerImpl::opacity (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
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 SetNeedsPushProperties(); 140 SetNeedsPushProperties();
141 } 141 }
142 bool should_flatten_transform_from_property_tree() const { 142 bool should_flatten_transform_from_property_tree() const {
143 return should_flatten_transform_from_property_tree_; 143 return should_flatten_transform_from_property_tree_;
144 } 144 }
145 145
146 bool is_clipped() const { return draw_properties_.is_clipped; } 146 bool is_clipped() const { return draw_properties_.is_clipped; }
147 147
148 void UpdatePropertyTreeTransform(); 148 void UpdatePropertyTreeTransform();
149 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); 149 void UpdatePropertyTreeTransformIsAnimated(bool is_animated);
150 void UpdatePropertyTreeOpacity(); 150 void UpdatePropertyTreeOpacity(float opacity);
151 void UpdatePropertyTreeScrollOffset(); 151 void UpdatePropertyTreeScrollOffset();
152 152
153 // For compatibility with Layer. 153 // For compatibility with Layer.
154 bool has_render_surface() const { return !!render_surface(); } 154 bool has_render_surface() const { return !!render_surface(); }
155 155
156 void PassCopyRequests( 156 void PassCopyRequests(
157 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); 157 std::vector<std::unique_ptr<CopyOutputRequest>>* requests);
158 // Can only be called when the layer has a copy request. 158 // Can only be called when the layer has a copy request.
159 void TakeCopyRequestsAndTransformToTarget( 159 void TakeCopyRequestsAndTransformToTarget(
160 std::vector<std::unique_ptr<CopyOutputRequest>>* request); 160 std::vector<std::unique_ptr<CopyOutputRequest>>* request);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 const FilterOperations& background_filters() const { 232 const FilterOperations& background_filters() const {
233 return background_filters_; 233 return background_filters_;
234 } 234 }
235 235
236 void SetMasksToBounds(bool masks_to_bounds); 236 void SetMasksToBounds(bool masks_to_bounds);
237 bool masks_to_bounds() const { return masks_to_bounds_; } 237 bool masks_to_bounds() const { return masks_to_bounds_; }
238 238
239 void SetContentsOpaque(bool opaque); 239 void SetContentsOpaque(bool opaque);
240 bool contents_opaque() const { return contents_opaque_; } 240 bool contents_opaque() const { return contents_opaque_; }
241 241
242 void SetOpacity(float opacity); 242 float Opacity() const;
243 float opacity() const { return opacity_; }
244 bool OpacityIsAnimating() const; 243 bool OpacityIsAnimating() const;
245 bool HasPotentiallyRunningOpacityAnimation() const; 244 bool HasPotentiallyRunningOpacityAnimation() const;
246 245
247 void SetElementId(uint64_t element_id); 246 void SetElementId(uint64_t element_id);
248 uint64_t element_id() const { return element_id_; } 247 uint64_t element_id() const { return element_id_; }
249 248
250 void SetMutableProperties(uint32_t properties); 249 void SetMutableProperties(uint32_t properties);
251 uint32_t mutable_properties() const { return mutable_properties_; } 250 uint32_t mutable_properties() const { return mutable_properties_; }
252 251
253 void SetBlendMode(SkXfermode::Mode); 252 void SetBlendMode(SkXfermode::Mode);
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 592
594 // This is true if and only if the layer was ever ready since it last animated 593 // This is true if and only if the layer was ever ready since it last animated
595 // (all content was complete). 594 // (all content was complete).
596 bool was_ever_ready_since_last_transform_animation_ : 1; 595 bool was_ever_ready_since_last_transform_animation_ : 1;
597 596
598 Region non_fast_scrollable_region_; 597 Region non_fast_scrollable_region_;
599 Region touch_event_handler_region_; 598 Region touch_event_handler_region_;
600 SkColor background_color_; 599 SkColor background_color_;
601 SkColor safe_opaque_background_color_; 600 SkColor safe_opaque_background_color_;
602 601
603 float opacity_;
604 SkXfermode::Mode blend_mode_; 602 SkXfermode::Mode blend_mode_;
605 // draw_blend_mode may be different than blend_mode_, 603 // draw_blend_mode may be different than blend_mode_,
606 // when a RenderSurface re-parents the layer's blend_mode. 604 // when a RenderSurface re-parents the layer's blend_mode.
607 SkXfermode::Mode draw_blend_mode_; 605 SkXfermode::Mode draw_blend_mode_;
608 gfx::PointF position_; 606 gfx::PointF position_;
609 gfx::Transform transform_; 607 gfx::Transform transform_;
610 608
611 gfx::Rect clip_rect_in_target_space_; 609 gfx::Rect clip_rect_in_target_space_;
612 int transform_tree_index_; 610 int transform_tree_index_;
613 int effect_tree_index_; 611 int effect_tree_index_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 651
654 bool scrolls_drawn_descendant_; 652 bool scrolls_drawn_descendant_;
655 bool has_will_change_transform_hint_; 653 bool has_will_change_transform_hint_;
656 654
657 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 655 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
658 }; 656 };
659 657
660 } // namespace cc 658 } // namespace cc
661 659
662 #endif // CC_LAYERS_LAYER_IMPL_H_ 660 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698