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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
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 b8436756fc4762df4194493b3d602e274a8d1ab3..49f86b990cc980cd4d189d23790db776c74eb77b 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -576,6 +576,24 @@ static bool SubtreeShouldRenderToSeparateSurface(
return true;
}
+ // If the layer has blending.
+ if (layer->has_blend_mode()) {
shawnsingh 2013/09/25 05:33:53 Can we support blend modes for layers when possibl
rosca 2013/09/25 18:00:00 This is one of the optimizations I was thinking of
+ TRACE_EVENT_INSTANT0(
+ "cc",
+ "LayerTreeHostCommon::SubtreeShouldRenderToSeparateSurface blending",
+ TRACE_EVENT_SCOPE_THREAD);
+ return true;
+ }
+
+ // If the layer has isolation.
+ if (layer->is_root_for_isolated_group()) {
enne (OOO) 2013/09/24 18:05:48 Whoa there. According to http://dev.w3.org/fxtf/c
rosca 2013/09/24 21:22:47 We create separate rendering surfaces only for sta
shawnsingh 2013/09/25 05:33:53 Enne@ - I disagree about using setForceRenderSurfa
enne (OOO) 2013/09/26 16:25:13 I think there's sort of two approaches you can tak
rosca 2013/09/27 10:39:06 I added a TODO comment with this improvement in th
enne (OOO) 2013/09/27 17:42:33 Can you file a bug, assign it to yourself, and ref
rosca 2013/09/30 17:28:36 Here is the bug: http://crbug.com/301738. Unfortun
+ TRACE_EVENT_INSTANT0(
+ "cc",
+ "LayerTreeHostCommon::SubtreeShouldRenderToSeparateSurface isolation",
+ TRACE_EVENT_SCOPE_THREAD);
+ return true;
+ }
+
// If the layer clips its descendants but it is not axis-aligned with respect
// to its parent.
bool layer_clips_external_content =
@@ -1514,6 +1532,8 @@ static void CalculateDrawPropertiesInternal(
layer_draw_properties.screen_space_opacity_is_animating =
animating_opacity_to_screen;
+ render_surface->SetHasBlendMode(layer->has_blend_mode());
shawnsingh 2013/09/25 05:33:53 FYI, if we do add support for blend modes on layer
rosca 2013/09/25 18:00:00 I removed the has_blend_mode property from RenderS
+
render_surface->SetTargetSurfaceTransformsAreAnimating(
animating_transform_to_target);
render_surface->SetScreenSpaceTransformsAreAnimating(

Powered by Google App Engine
This is Rietveld 408576698