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

Unified Diff: cc/trees/clip_expander.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_expander.h ('k') | cc/trees/clip_node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/clip_expander.cc
diff --git a/cc/trees/clip_expander.cc b/cc/trees/clip_expander.cc
deleted file mode 100644
index 7284878e95684ca0b4ae2720ee9459416422d434..0000000000000000000000000000000000000000
--- a/cc/trees/clip_expander.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/trees/clip_expander.h"
-#include "cc/trees/effect_node.h"
-#include "cc/trees/property_tree.h"
-#include "ui/gfx/transform.h"
-
-namespace cc {
-
-ClipExpander::ClipExpander(int filter_effect_id)
- : target_effect_id_(filter_effect_id) {}
-
-ClipExpander::ClipExpander(const ClipExpander& other) = default;
-
-bool ClipExpander::operator==(const ClipExpander& other) const {
- return target_effect_id_ == other.target_effect_id_;
-}
-
-gfx::Rect ClipExpander::MapRect(const gfx::Rect& rect,
- const PropertyTrees* property_trees) const {
- const EffectNode* effect_node =
- property_trees->effect_tree.Node(target_effect_id_);
- gfx::Transform filter_draw_transform;
- filter_draw_transform.Scale(effect_node->surface_contents_scale.x(),
- effect_node->surface_contents_scale.y());
- return effect_node->filters.MapRect(rect, filter_draw_transform.matrix());
-}
-
-gfx::Rect ClipExpander::MapRectReverse(
- const gfx::Rect& rect,
- const PropertyTrees* property_trees) const {
- const EffectNode* effect_node =
- property_trees->effect_tree.Node(target_effect_id_);
- gfx::Transform filter_draw_transform;
- filter_draw_transform.Scale(effect_node->surface_contents_scale.x(),
- effect_node->surface_contents_scale.y());
- return effect_node->filters.MapRectReverse(rect,
- filter_draw_transform.matrix());
-}
-
-} // namespace cc
« no previous file with comments | « cc/trees/clip_expander.h ('k') | cc/trees/clip_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698