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

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

Issue 2184773002: cc: Move blend_mode to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 bool contents_opaque() const { return contents_opaque_; } 205 bool contents_opaque() const { return contents_opaque_; }
206 206
207 float Opacity() const; 207 float Opacity() const;
208 208
209 void SetElementId(ElementId element_id); 209 void SetElementId(ElementId element_id);
210 ElementId element_id() const { return element_id_; } 210 ElementId element_id() const { return element_id_; }
211 211
212 void SetMutableProperties(uint32_t properties); 212 void SetMutableProperties(uint32_t properties);
213 uint32_t mutable_properties() const { return mutable_properties_; } 213 uint32_t mutable_properties() const { return mutable_properties_; }
214 214
215 void SetBlendMode(SkXfermode::Mode);
216 SkXfermode::Mode blend_mode() const { return blend_mode_; }
217 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { 215 void set_draw_blend_mode(SkXfermode::Mode blend_mode) {
218 draw_blend_mode_ = blend_mode; 216 draw_blend_mode_ = blend_mode;
219 } 217 }
220 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } 218 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; }
221 bool uses_default_blend_mode() const {
222 return blend_mode_ == SkXfermode::kSrcOver_Mode;
223 }
224 219
225 void SetPosition(const gfx::PointF& position); 220 void SetPosition(const gfx::PointF& position);
226 gfx::PointF position() const { return position_; } 221 gfx::PointF position() const { return position_; }
227 222
228 bool IsAffectedByPageScale() const; 223 bool IsAffectedByPageScale() const;
229 224
230 gfx::Vector2dF FixedContainerSizeDelta() const; 225 gfx::Vector2dF FixedContainerSizeDelta() const;
231 226
232 bool Is3dSorted() const { return sorting_context_id_ != 0; } 227 bool Is3dSorted() const { return sorting_context_id_ != 0; }
233 228
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 529
535 // This is true if and only if the layer was ever ready since it last animated 530 // This is true if and only if the layer was ever ready since it last animated
536 // (all content was complete). 531 // (all content was complete).
537 bool was_ever_ready_since_last_transform_animation_ : 1; 532 bool was_ever_ready_since_last_transform_animation_ : 1;
538 533
539 Region non_fast_scrollable_region_; 534 Region non_fast_scrollable_region_;
540 Region touch_event_handler_region_; 535 Region touch_event_handler_region_;
541 SkColor background_color_; 536 SkColor background_color_;
542 SkColor safe_opaque_background_color_; 537 SkColor safe_opaque_background_color_;
543 538
544 SkXfermode::Mode blend_mode_;
545 // draw_blend_mode may be different than blend_mode_,
546 // when a RenderSurface re-parents the layer's blend_mode.
547 SkXfermode::Mode draw_blend_mode_; 539 SkXfermode::Mode draw_blend_mode_;
548 gfx::PointF position_; 540 gfx::PointF position_;
549 gfx::Transform transform_; 541 gfx::Transform transform_;
550 542
551 gfx::Rect clip_rect_in_target_space_; 543 gfx::Rect clip_rect_in_target_space_;
552 int transform_tree_index_; 544 int transform_tree_index_;
553 int effect_tree_index_; 545 int effect_tree_index_;
554 int clip_tree_index_; 546 int clip_tree_index_;
555 int scroll_tree_index_; 547 int scroll_tree_index_;
556 548
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 bool scrolls_drawn_descendant_ : 1; 581 bool scrolls_drawn_descendant_ : 1;
590 bool has_will_change_transform_hint_ : 1; 582 bool has_will_change_transform_hint_ : 1;
591 bool needs_push_properties_ : 1; 583 bool needs_push_properties_ : 1;
592 584
593 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 585 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
594 }; 586 };
595 587
596 } // namespace cc 588 } // namespace cc
597 589
598 #endif // CC_LAYERS_LAYER_IMPL_H_ 590 #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