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

Unified Diff: cc/layers/draw_properties.h

Issue 549683002: Adding blend mode to DrawProperties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/draw_properties.h
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h
index 4bbce727deff70f122c131dad21a4b756a01d72c..9fa40527c6811b9a400926bc093f36c8c608e76a 100644
--- a/cc/layers/draw_properties.h
+++ b/cc/layers/draw_properties.h
@@ -6,6 +6,7 @@
#define CC_LAYERS_DRAW_PROPERTIES_H_
#include "base/memory/scoped_ptr.h"
+#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
@@ -18,6 +19,7 @@ struct CC_EXPORT DrawProperties {
DrawProperties()
: opacity(0.f),
opacity_is_animating(false),
+ blend_mode(SkXfermode::kSrcOver_Mode),
screen_space_opacity_is_animating(false),
target_space_transform_is_animating(false),
screen_space_transform_is_animating(false),
@@ -58,6 +60,12 @@ struct CC_EXPORT DrawProperties {
// animating, the main thread may not have the same values that are used
// to draw.
bool opacity_is_animating;
+
+ // DrawProperties::blend_mode may be different than LayerType::blend_mode,
+ // particularly in the case when the LayerType has it own RenderSurface which
+ // will take the responsibility to blend the entire subtree.
+ SkXfermode::Mode blend_mode;
+
bool screen_space_opacity_is_animating;
bool target_space_transform_is_animating;
bool screen_space_transform_is_animating;
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698