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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 1625473002: compositor-worker: blink->cc plumbing Base URL: https://chromium.googlesource.com/chromium/src.git@upstream-compositor-worker
Patch Set: Merge with landing of https://codereview.chromium.org/1599673002/ on master Created 4 years, 11 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/trees/layer_tree_host_impl.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_builder.cc
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index a27bd3c8bf6e0d2575138592243cdb29d565bcf1..6bc2a8946005bab0e520b71934c8909d37e0f606 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -9,6 +9,7 @@
#include <map>
#include <set>
+#include "cc/animation/mutable_properties.h"
#include "cc/base/math_util.h"
#include "cc/layers/layer.h"
#include "cc/layers/layer_impl.h"
@@ -222,6 +223,9 @@ bool AddTransformNodeIfNeeded(
const bool has_any_transform_animation =
layer->HasAnyAnimationTargetingProperty(Animation::TRANSFORM);
+ const bool has_proxied_transform_related_property =
+ layer->mutable_properties() & MutableProperty::kTransformRelated;
+
const bool has_surface = created_render_surface;
// A transform node is needed to change the render target for subtree when
@@ -235,6 +239,7 @@ bool AddTransformNodeIfNeeded(
bool requires_node = is_root || is_scrollable || has_significant_transform ||
has_any_transform_animation || has_surface || is_fixed ||
is_page_scale_layer || is_overscroll_elasticity_layer ||
+ has_proxied_transform_related_property ||
scroll_child_has_different_target;
LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer);
@@ -559,6 +564,8 @@ bool AddEffectNodeIfNeeded(
const bool is_root = !layer->parent();
const bool has_transparency = layer->opacity() != 1.f;
const bool has_animated_opacity = IsAnimatingOpacity(layer);
+ const bool has_proxied_opacity =
+ layer->mutable_properties() & MutableProperty::kOpacity;
const bool should_create_render_surface = ShouldCreateRenderSurface(
layer, data_from_ancestor.compound_transform_since_render_target,
data_from_ancestor.axis_align_since_render_target);
@@ -566,7 +573,7 @@ bool AddEffectNodeIfNeeded(
layer->AnimationsPreserveAxisAlignment();
bool requires_node = is_root || has_transparency || has_animated_opacity ||
- should_create_render_surface;
+ has_proxied_opacity || should_create_render_surface;
int parent_id = data_from_ancestor.effect_tree_parent;
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698