Commit 62f5a1a0 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

cc: removes template param from DataForRecursion

It's unused.

BUG=none
TEST=none

Change-Id: I4314c2f987b1511254a7cdddbe2ae7cecd23431b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632301Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663812}
parent 76e77b82
...@@ -30,7 +30,6 @@ namespace cc { ...@@ -30,7 +30,6 @@ namespace cc {
namespace { namespace {
template <typename LayerType>
struct DataForRecursion { struct DataForRecursion {
int transform_tree_parent; int transform_tree_parent;
int transform_tree_parent_fixed; int transform_tree_parent_fixed;
...@@ -90,33 +89,28 @@ class PropertyTreeBuilderContext { ...@@ -90,33 +89,28 @@ class PropertyTreeBuilderContext {
private: private:
void BuildPropertyTreesInternal( void BuildPropertyTreesInternal(
LayerType* layer, LayerType* layer,
const DataForRecursion<LayerType>& data_from_parent) const; const DataForRecursion& data_from_parent) const;
bool AddTransformNodeIfNeeded( bool AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor,
const DataForRecursion<LayerType>& data_from_ancestor,
LayerType* layer, LayerType* layer,
bool created_render_surface, bool created_render_surface,
DataForRecursion<LayerType>* data_for_children) const; DataForRecursion* data_for_children) const;
void AddClipNodeIfNeeded( void AddClipNodeIfNeeded(const DataForRecursion& data_from_ancestor,
const DataForRecursion<LayerType>& data_from_ancestor,
LayerType* layer, LayerType* layer,
bool created_transform_node, bool created_transform_node,
DataForRecursion<LayerType>* data_for_children) const; DataForRecursion* data_for_children) const;
bool AddEffectNodeIfNeeded( bool AddEffectNodeIfNeeded(const DataForRecursion& data_from_ancestor,
const DataForRecursion<LayerType>& data_from_ancestor,
LayerType* layer, LayerType* layer,
DataForRecursion<LayerType>* data_for_children) const; DataForRecursion* data_for_children) const;
void AddScrollNodeIfNeeded( void AddScrollNodeIfNeeded(const DataForRecursion& data_from_ancestor,
const DataForRecursion<LayerType>& data_from_ancestor,
LayerType* layer, LayerType* layer,
DataForRecursion<LayerType>* data_for_children) const; DataForRecursion* data_for_children) const;
bool UpdateRenderSurfaceIfNeeded( bool UpdateRenderSurfaceIfNeeded(int parent_effect_tree_id,
int parent_effect_tree_id, DataForRecursion* data_for_children,
DataForRecursion<LayerType>* data_for_children,
bool subtree_has_rounded_corner, bool subtree_has_rounded_corner,
bool created_transform_node) const; bool created_transform_node) const;
...@@ -309,8 +303,7 @@ bool HasAnyAnimationTargetingProperty(const MutatorHost& host, ...@@ -309,8 +303,7 @@ bool HasAnyAnimationTargetingProperty(const MutatorHost& host,
// ------------------------------------------------------------------- // -------------------------------------------------------------------
template <typename LayerType> template <typename LayerType>
static int GetTransformParent(const DataForRecursion<LayerType>& data, static int GetTransformParent(const DataForRecursion& data, LayerType* layer) {
LayerType* layer) {
return PositionConstraint(layer).is_fixed_position() return PositionConstraint(layer).is_fixed_position()
? data.transform_tree_parent_fixed ? data.transform_tree_parent_fixed
: data.transform_tree_parent; : data.transform_tree_parent;
...@@ -323,8 +316,7 @@ static bool LayerClipsSubtree(LayerType* layer) { ...@@ -323,8 +316,7 @@ static bool LayerClipsSubtree(LayerType* layer) {
} }
template <typename LayerType> template <typename LayerType>
static int GetScrollParentId(const DataForRecursion<LayerType>& data, static int GetScrollParentId(const DataForRecursion& data, LayerType* layer) {
LayerType* layer) {
const bool inherits_scroll = !ScrollParent(layer); const bool inherits_scroll = !ScrollParent(layer);
const int id = inherits_scroll ? data.scroll_tree_parent const int id = inherits_scroll ? data.scroll_tree_parent
: ScrollParent(layer)->scroll_tree_index(); : ScrollParent(layer)->scroll_tree_index();
...@@ -365,10 +357,10 @@ static inline bool HasLatestSequenceNumber(const LayerImpl*, int) { ...@@ -365,10 +357,10 @@ static inline bool HasLatestSequenceNumber(const LayerImpl*, int) {
template <typename LayerType> template <typename LayerType>
void PropertyTreeBuilderContext<LayerType>::AddClipNodeIfNeeded( void PropertyTreeBuilderContext<LayerType>::AddClipNodeIfNeeded(
const DataForRecursion<LayerType>& data_from_ancestor, const DataForRecursion& data_from_ancestor,
LayerType* layer, LayerType* layer,
bool created_transform_node, bool created_transform_node,
DataForRecursion<LayerType>* data_for_children) const { DataForRecursion* data_for_children) const {
const bool inherits_clip = !ClipParent(layer); const bool inherits_clip = !ClipParent(layer);
// Sanity check the clip parent already built clip node before us. // Sanity check the clip parent already built clip node before us.
DCHECK(inherits_clip || DCHECK(inherits_clip ||
...@@ -435,10 +427,10 @@ static inline bool ShouldFlattenTransform(LayerImpl* layer) { ...@@ -435,10 +427,10 @@ static inline bool ShouldFlattenTransform(LayerImpl* layer) {
template <typename LayerType> template <typename LayerType>
bool PropertyTreeBuilderContext<LayerType>::AddTransformNodeIfNeeded( bool PropertyTreeBuilderContext<LayerType>::AddTransformNodeIfNeeded(
const DataForRecursion<LayerType>& data_from_ancestor, const DataForRecursion& data_from_ancestor,
LayerType* layer, LayerType* layer,
bool created_render_surface, bool created_render_surface,
DataForRecursion<LayerType>* data_for_children) const { DataForRecursion* data_for_children) const {
const bool is_root = !LayerParent(layer); const bool is_root = !LayerParent(layer);
const bool is_page_scale_layer = layer == page_scale_layer_; const bool is_page_scale_layer = layer == page_scale_layer_;
const bool is_overscroll_elasticity_layer = const bool is_overscroll_elasticity_layer =
...@@ -992,9 +984,9 @@ bool UpdateSubtreeHasCopyRequestRecursive(LayerType* layer) { ...@@ -992,9 +984,9 @@ bool UpdateSubtreeHasCopyRequestRecursive(LayerType* layer) {
template <typename LayerType> template <typename LayerType>
bool PropertyTreeBuilderContext<LayerType>::AddEffectNodeIfNeeded( bool PropertyTreeBuilderContext<LayerType>::AddEffectNodeIfNeeded(
const DataForRecursion<LayerType>& data_from_ancestor, const DataForRecursion& data_from_ancestor,
LayerType* layer, LayerType* layer,
DataForRecursion<LayerType>* data_for_children) const { DataForRecursion* data_for_children) const {
const bool is_root = !LayerParent(layer); const bool is_root = !LayerParent(layer);
const bool has_transparency = EffectiveOpacity(layer) != 1.f; const bool has_transparency = EffectiveOpacity(layer) != 1.f;
const bool has_potential_opacity_animation = const bool has_potential_opacity_animation =
...@@ -1136,7 +1128,7 @@ bool PropertyTreeBuilderContext<LayerType>::AddEffectNodeIfNeeded( ...@@ -1136,7 +1128,7 @@ bool PropertyTreeBuilderContext<LayerType>::AddEffectNodeIfNeeded(
template <typename LayerType> template <typename LayerType>
bool PropertyTreeBuilderContext<LayerType>::UpdateRenderSurfaceIfNeeded( bool PropertyTreeBuilderContext<LayerType>::UpdateRenderSurfaceIfNeeded(
int parent_effect_tree_id, int parent_effect_tree_id,
DataForRecursion<LayerType>* data_for_children, DataForRecursion* data_for_children,
bool subtree_has_rounded_corner, bool subtree_has_rounded_corner,
bool created_transform_node) const { bool created_transform_node) const {
// No effect node was generated for this layer. // No effect node was generated for this layer.
...@@ -1224,9 +1216,9 @@ void SetHasTransformNode(LayerType* layer, bool val) { ...@@ -1224,9 +1216,9 @@ void SetHasTransformNode(LayerType* layer, bool val) {
template <typename LayerType> template <typename LayerType>
void PropertyTreeBuilderContext<LayerType>::AddScrollNodeIfNeeded( void PropertyTreeBuilderContext<LayerType>::AddScrollNodeIfNeeded(
const DataForRecursion<LayerType>& data_from_ancestor, const DataForRecursion& data_from_ancestor,
LayerType* layer, LayerType* layer,
DataForRecursion<LayerType>* data_for_children) const { DataForRecursion* data_for_children) const {
int parent_id = GetScrollParentId(data_from_ancestor, layer); int parent_id = GetScrollParentId(data_from_ancestor, layer);
bool is_root = !LayerParent(layer); bool is_root = !LayerParent(layer);
...@@ -1318,10 +1310,9 @@ void SetBackfaceVisibilityTransform(LayerType* layer, ...@@ -1318,10 +1310,9 @@ void SetBackfaceVisibilityTransform(LayerType* layer,
} }
template <typename LayerType> template <typename LayerType>
void SetSafeOpaqueBackgroundColor( void SetSafeOpaqueBackgroundColor(const DataForRecursion& data_from_ancestor,
const DataForRecursion<LayerType>& data_from_ancestor,
LayerType* layer, LayerType* layer,
DataForRecursion<LayerType>* data_for_children) { DataForRecursion* data_for_children) {
SkColor background_color = layer->background_color(); SkColor background_color = layer->background_color();
data_for_children->safe_opaque_background_color = data_for_children->safe_opaque_background_color =
SkColorGetA(background_color) == 255 SkColorGetA(background_color) == 255
...@@ -1342,10 +1333,10 @@ static void SetLayerPropertyChangedForChild(LayerImpl* parent, ...@@ -1342,10 +1333,10 @@ static void SetLayerPropertyChangedForChild(LayerImpl* parent,
template <typename LayerType> template <typename LayerType>
void PropertyTreeBuilderContext<LayerType>::BuildPropertyTreesInternal( void PropertyTreeBuilderContext<LayerType>::BuildPropertyTreesInternal(
LayerType* layer, LayerType* layer,
const DataForRecursion<LayerType>& data_from_parent) const { const DataForRecursion& data_from_parent) const {
layer->set_property_tree_sequence_number(property_trees_.sequence_number); layer->set_property_tree_sequence_number(property_trees_.sequence_number);
DataForRecursion<LayerType> data_for_children(data_from_parent); DataForRecursion data_for_children(data_from_parent);
*data_for_children.subtree_has_rounded_corner = false; *data_for_children.subtree_has_rounded_corner = false;
bool created_render_surface = bool created_render_surface =
...@@ -1477,7 +1468,7 @@ void PropertyTreeBuilderContext<LayerType>::BuildPropertyTrees( ...@@ -1477,7 +1468,7 @@ void PropertyTreeBuilderContext<LayerType>::BuildPropertyTrees(
return; return;
} }
DataForRecursion<LayerType> data_for_recursion; DataForRecursion data_for_recursion;
data_for_recursion.transform_tree_parent = TransformTree::kInvalidNodeId; data_for_recursion.transform_tree_parent = TransformTree::kInvalidNodeId;
data_for_recursion.transform_tree_parent_fixed = data_for_recursion.transform_tree_parent_fixed =
TransformTree::kInvalidNodeId; TransformTree::kInvalidNodeId;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment