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

Unified 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: removed src/webkit/renderer/compositor_bindings Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 889e09ba0bbec7ef01e77d1afd7603aef1c14596..499c1666a29d99148a121f38c4d5af693c1789d4 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -126,6 +126,18 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
bool OpacityIsAnimating() const;
virtual bool OpacityCanAnimateOnImplThread() const;
+ void SetBlendMode(SkXfermode::Mode blend_mode);
+ SkXfermode::Mode blend_mode() const { return blend_mode_; }
+
+ bool uses_default_blend_mode() const {
+ return blend_mode_ == SkXfermode::kSrcOver_Mode;
+ }
+
+ void SetIsRootForIsolatedGroup(bool root);
danakj 2013/11/13 21:02:03 Can you put a comment explaining what this means?
rosca 2013/11/14 21:56:34 Done.
+ bool is_root_for_isolated_group() const {
+ return is_root_for_isolated_group_;
+ }
+
void SetFilters(const FilterOperations& filters);
const FilterOperations& filters() const { return filters_; }
bool FilterIsAnimating() const;
@@ -459,6 +471,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
// unused resources on the impl thread are returned before commit completes.
void SetNextCommitWaitsForActivation();
+ // Called when the blend mode or filters have been changed
danakj 2013/11/13 21:02:03 period at the end of sentences
rosca 2013/11/14 21:56:34 Done.
+ void SetNeedsFilterContextIfNeeded();
+
void SetNeedsPushProperties();
void AddDependentNeedsPushProperties();
void RemoveDependentNeedsPushProperties();
@@ -551,6 +566,8 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
SkColor background_color_;
CompositingReasons compositing_reasons_;
float opacity_;
+ SkXfermode::Mode blend_mode_;
+ bool is_root_for_isolated_group_;
FilterOperations filters_;
FilterOperations background_filters_;
float anchor_point_z_;

Powered by Google App Engine
This is Rietveld 408576698