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

Unified Diff: cc/trees/layer_tree_host_common.cc

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 | « cc/layers/video_layer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 840a32b2ef4a59037f22e33e251c9edee72bc649..fe769abeb71762644153d5fcda7736861dd30e53 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -1884,6 +1884,9 @@ static void CalculateDrawPropertiesInternal(
layer_draw_properties.screen_space_opacity_is_animating =
animating_opacity_to_screen;
+ // The render surface will be responsible for applying the blend mode.
+ layer_draw_properties.blend_mode = SkXfermode::kSrcOver_Mode;
+
render_surface->SetTargetSurfaceTransformsAreAnimating(
animating_transform_to_target);
render_surface->SetScreenSpaceTransformsAreAnimating(
@@ -2002,6 +2005,7 @@ static void CalculateDrawPropertiesInternal(
animating_transform_to_screen;
layer_draw_properties.opacity = accumulated_draw_opacity;
layer_draw_properties.opacity_is_animating = animating_opacity_to_target;
+ layer_draw_properties.blend_mode = layer->blend_mode();
layer_draw_properties.screen_space_opacity_is_animating =
animating_opacity_to_screen;
data_for_children.parent_matrix = combined_transform;
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698