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

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

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added compositor_bindungs Created 7 years, 2 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 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const Layer* mask_layer() const { return mask_layer_.get(); } 114 const Layer* mask_layer() const { return mask_layer_.get(); }
115 115
116 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); 116 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect);
117 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } 117 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); }
118 118
119 void SetOpacity(float opacity); 119 void SetOpacity(float opacity);
120 float opacity() const { return opacity_; } 120 float opacity() const { return opacity_; }
121 bool OpacityIsAnimating() const; 121 bool OpacityIsAnimating() const;
122 virtual bool OpacityCanAnimateOnImplThread() const; 122 virtual bool OpacityCanAnimateOnImplThread() const;
123 123
124 void SetBlendMode(SkXfermode::Mode blendMode);
enne (OOO) 2013/10/11 18:14:35 blend_mode
rosca 2013/10/16 14:54:47 Done.
125 SkXfermode::Mode blend_mode() const { return blend_mode_; }
126
127 bool uses_default_blend_mode() const {
128 return blend_mode_ == SkXfermode::kSrcOver_Mode;
129 }
130
131 void SetIsRootForIsolatedGroup(bool root);
132 bool is_root_for_isolated_group() const {
133 return is_root_for_isolated_group_;
134 }
135
124 void SetFilters(const FilterOperations& filters); 136 void SetFilters(const FilterOperations& filters);
125 const FilterOperations& filters() const { return filters_; } 137 const FilterOperations& filters() const { return filters_; }
126 138
127 // Background filters are filters applied to what is behind this layer, when 139 // Background filters are filters applied to what is behind this layer, when
128 // they are viewed through non-opaque regions in this layer. They are used 140 // they are viewed through non-opaque regions in this layer. They are used
129 // through the WebLayer interface, and are not exposed to HTML. 141 // through the WebLayer interface, and are not exposed to HTML.
130 void SetBackgroundFilters(const FilterOperations& filters); 142 void SetBackgroundFilters(const FilterOperations& filters);
131 const FilterOperations& background_filters() const { 143 const FilterOperations& background_filters() const {
132 return background_filters_; 144 return background_filters_;
133 } 145 }
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 bool scrollable_; 545 bool scrollable_;
534 bool should_scroll_on_main_thread_; 546 bool should_scroll_on_main_thread_;
535 bool have_wheel_event_handlers_; 547 bool have_wheel_event_handlers_;
536 Region non_fast_scrollable_region_; 548 Region non_fast_scrollable_region_;
537 Region touch_event_handler_region_; 549 Region touch_event_handler_region_;
538 gfx::PointF position_; 550 gfx::PointF position_;
539 gfx::PointF anchor_point_; 551 gfx::PointF anchor_point_;
540 SkColor background_color_; 552 SkColor background_color_;
541 CompositingReasons compositing_reasons_; 553 CompositingReasons compositing_reasons_;
542 float opacity_; 554 float opacity_;
555 SkXfermode::Mode blend_mode_;
556 bool is_root_for_isolated_group_;
543 FilterOperations filters_; 557 FilterOperations filters_;
544 FilterOperations background_filters_; 558 FilterOperations background_filters_;
545 float anchor_point_z_; 559 float anchor_point_z_;
546 bool is_container_for_fixed_position_layers_; 560 bool is_container_for_fixed_position_layers_;
547 LayerPositionConstraint position_constraint_; 561 LayerPositionConstraint position_constraint_;
548 bool is_drawable_; 562 bool is_drawable_;
549 bool hide_layer_and_subtree_; 563 bool hide_layer_and_subtree_;
550 bool masks_to_bounds_; 564 bool masks_to_bounds_;
551 bool contents_opaque_; 565 bool contents_opaque_;
552 bool double_sided_; 566 bool double_sided_;
(...skipping 25 matching lines...) Expand all
578 DrawProperties<Layer, RenderSurface> draw_properties_; 592 DrawProperties<Layer, RenderSurface> draw_properties_;
579 593
580 PaintProperties paint_properties_; 594 PaintProperties paint_properties_;
581 595
582 DISALLOW_COPY_AND_ASSIGN(Layer); 596 DISALLOW_COPY_AND_ASSIGN(Layer);
583 }; 597 };
584 598
585 } // namespace cc 599 } // namespace cc
586 600
587 #endif // CC_LAYERS_LAYER_H_ 601 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/compositing_reasons.h ('k') | cc/layers/layer.cc » ('j') | cc/layers/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698