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

Unified Diff: cc/trees/clip_node.cc

Issue 2468113004: Revert of cc: Make visible rect computation aware of pixel-moving filters (Closed)
Patch Set: Created 4 years, 1 month 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/clip_node.h ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/clip_node.cc
diff --git a/cc/trees/clip_node.cc b/cc/trees/clip_node.cc
index 2132fdcfee766cdee01b0a8253587cc19dc6d9e3..b49263d5a332086920137f9c24b180067dea5dbf 100644
--- a/cc/trees/clip_node.cc
+++ b/cc/trees/clip_node.cc
@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event_argument.h"
#include "cc/base/math_util.h"
#include "cc/proto/cc_conversions.h"
#include "cc/proto/gfx_conversions.h"
#include "cc/proto/property_tree.pb.h"
#include "cc/trees/clip_node.h"
-#include "cc/trees/property_tree.h"
namespace cc {
@@ -27,68 +25,9 @@
layers_are_clipped_when_surfaces_disabled(false),
resets_clip(false) {}
-ClipNode::ClipNode(const ClipNode& other)
- : id(other.id),
- parent_id(other.parent_id),
- owner_id(other.owner_id),
- clip_type(other.clip_type),
- clip(other.clip),
- combined_clip_in_target_space(other.combined_clip_in_target_space),
- clip_in_target_space(other.clip_in_target_space),
- transform_id(other.transform_id),
- target_transform_id(other.target_transform_id),
- target_effect_id(other.target_effect_id),
- layer_clipping_uses_only_local_clip(
- other.layer_clipping_uses_only_local_clip),
- target_is_clipped(other.target_is_clipped),
- layers_are_clipped(other.layers_are_clipped),
- layers_are_clipped_when_surfaces_disabled(
- other.layers_are_clipped_when_surfaces_disabled),
- resets_clip(other.resets_clip) {
- if (other.clip_expander) {
- DCHECK_EQ(clip_type, ClipType::EXPANDS_CLIP);
- clip_expander = base::MakeUnique<ClipExpander>(*other.clip_expander);
- }
-}
-
-ClipNode& ClipNode::operator=(const ClipNode& other) {
- id = other.id;
- parent_id = other.parent_id;
- owner_id = other.owner_id;
- clip_type = other.clip_type;
- clip = other.clip;
- combined_clip_in_target_space = other.combined_clip_in_target_space;
- clip_in_target_space = other.clip_in_target_space;
- transform_id = other.transform_id;
- target_transform_id = other.target_transform_id;
- target_effect_id = other.target_effect_id;
- layer_clipping_uses_only_local_clip =
- other.layer_clipping_uses_only_local_clip;
- target_is_clipped = other.target_is_clipped;
- layers_are_clipped = other.layers_are_clipped;
- layers_are_clipped_when_surfaces_disabled =
- other.layers_are_clipped_when_surfaces_disabled;
- resets_clip = other.resets_clip;
-
- if (other.clip_expander) {
- DCHECK_EQ(clip_type, ClipType::EXPANDS_CLIP);
- clip_expander = base::MakeUnique<ClipExpander>(*other.clip_expander);
- } else {
- clip_expander.reset();
- }
-
- return *this;
-}
-
-ClipNode::~ClipNode() {}
+ClipNode::ClipNode(const ClipNode& other) = default;
bool ClipNode::operator==(const ClipNode& other) const {
- if (clip_expander && other.clip_expander &&
- *clip_expander != *other.clip_expander)
- return false;
- if ((clip_expander && !other.clip_expander) ||
- (!clip_expander && other.clip_expander))
- return false;
return id == other.id && parent_id == other.parent_id &&
owner_id == other.owner_id && clip_type == other.clip_type &&
clip == other.clip &&
@@ -115,10 +54,6 @@
proto::ClipNodeData* data = proto->mutable_clip_node_data();
data->set_clip_type(ClipNodeTypeToProto(clip_type));
- if (clip_type == ClipType::EXPANDS_CLIP)
- data->set_clip_expander_effect_id(clip_expander->target_effect_id());
- else
- data->set_clip_expander_effect_id(EffectTree::kInvalidNodeId);
RectFToProto(clip, data->mutable_clip());
RectFToProto(combined_clip_in_target_space,
@@ -146,12 +81,6 @@
const proto::ClipNodeData& data = proto.clip_node_data();
clip_type = ClipNodeTypeFromProto(data.clip_type());
- if (clip_type == ClipNode::ClipType::EXPANDS_CLIP) {
- clip_expander =
- base::MakeUnique<ClipExpander>(data.clip_expander_effect_id());
- } else {
- clip_expander.reset();
- }
clip = ProtoToRectF(data.clip());
combined_clip_in_target_space =
ProtoToRectF(data.combined_clip_in_target_space());
« no previous file with comments | « cc/trees/clip_node.h ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698