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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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_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 85bdbececf615f892b1b4e1b89399b9a530ab733..dd0472a1476fac4c0252f9ed5e348a95ea1601bb 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,11 +223,15 @@ bool AddTransformNodeIfNeeded(
const bool has_any_transform_animation =
layer->HasAnyAnimationTargetingProperty(Animation::TRANSFORM);
+ const bool has_proxied_transform_related_property =
+ layer->mutable_properties() & kMutablePropertyTransformRelated;
+
const bool has_surface = created_render_surface;
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;
+ is_page_scale_layer || is_overscroll_elasticity_layer ||
+ has_proxied_transform_related_property;
LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer);
DCHECK(is_root || transform_parent);
@@ -550,6 +555,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() & kMutablePropertyOpacity;
const bool should_create_render_surface = ShouldCreateRenderSurface(
layer, data_from_ancestor.compound_transform_since_render_target,
data_from_ancestor.axis_align_since_render_target);
@@ -557,7 +564,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_impl.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698