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

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: moving blend_mode property to SharedQuadState 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);
125 SkXfermode::Mode blend_mode() const { return blend_mode_; }
126
127 bool has_blend_mode() const {
enne (OOO) 2013/09/26 16:25:13 bikeshed: has_blend_mode is a little bit ambiguous
rosca 2013/09/27 10:39:06 Done.
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 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); 139 void SetFilter(const skia::RefPtr<SkImageFilter>& filter);
128 skia::RefPtr<SkImageFilter> filter() const { return filter_; } 140 skia::RefPtr<SkImageFilter> filter() const { return filter_; }
129 141
130 // Background filters are filters applied to what is behind this layer, when 142 // Background filters are filters applied to what is behind this layer, when
131 // they are viewed through non-opaque regions in this layer. They are used 143 // they are viewed through non-opaque regions in this layer. They are used
132 // through the WebLayer interface, and are not exposed to HTML. 144 // through the WebLayer interface, and are not exposed to HTML.
133 void SetBackgroundFilters(const FilterOperations& filters); 145 void SetBackgroundFilters(const FilterOperations& filters);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 bool scrollable_; 548 bool scrollable_;
537 bool should_scroll_on_main_thread_; 549 bool should_scroll_on_main_thread_;
538 bool have_wheel_event_handlers_; 550 bool have_wheel_event_handlers_;
539 Region non_fast_scrollable_region_; 551 Region non_fast_scrollable_region_;
540 Region touch_event_handler_region_; 552 Region touch_event_handler_region_;
541 gfx::PointF position_; 553 gfx::PointF position_;
542 gfx::PointF anchor_point_; 554 gfx::PointF anchor_point_;
543 SkColor background_color_; 555 SkColor background_color_;
544 CompositingReasons compositing_reasons_; 556 CompositingReasons compositing_reasons_;
545 float opacity_; 557 float opacity_;
558 SkXfermode::Mode blend_mode_;
559 bool is_root_for_isolated_group_;
546 skia::RefPtr<SkImageFilter> filter_; 560 skia::RefPtr<SkImageFilter> filter_;
547 FilterOperations filters_; 561 FilterOperations filters_;
548 FilterOperations background_filters_; 562 FilterOperations background_filters_;
549 float anchor_point_z_; 563 float anchor_point_z_;
550 bool is_container_for_fixed_position_layers_; 564 bool is_container_for_fixed_position_layers_;
551 LayerPositionConstraint position_constraint_; 565 LayerPositionConstraint position_constraint_;
552 bool is_drawable_; 566 bool is_drawable_;
553 bool hide_layer_and_subtree_; 567 bool hide_layer_and_subtree_;
554 bool masks_to_bounds_; 568 bool masks_to_bounds_;
555 bool contents_opaque_; 569 bool contents_opaque_;
(...skipping 26 matching lines...) Expand all
582 DrawProperties<Layer, RenderSurface> draw_properties_; 596 DrawProperties<Layer, RenderSurface> draw_properties_;
583 597
584 PaintProperties paint_properties_; 598 PaintProperties paint_properties_;
585 599
586 DISALLOW_COPY_AND_ASSIGN(Layer); 600 DISALLOW_COPY_AND_ASSIGN(Layer);
587 }; 601 };
588 602
589 } // namespace cc 603 } // namespace cc
590 604
591 #endif // CC_LAYERS_LAYER_H_ 605 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/compositing_reasons.h ('k') | cc/layers/layer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698