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

Side by Side Diff: cc/trees/clip_expander.h

Issue 2423483003: cc: Make visible rect computation aware of pixel-moving filters (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/clip_expander.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TREES_CLIP_EXPANDER_H_
6 #define CC_TREES_CLIP_EXPANDER_H_
7
8 #include "cc/base/cc_export.h"
9 #include "ui/gfx/geometry/rect.h"
10
11 namespace gfx {
12 class Transform;
13 }
14
15 namespace cc {
16
17 class PropertyTrees;
18
19 class CC_EXPORT ClipExpander {
20 public:
21 enum class ExpanderType { FILTER };
22
23 ClipExpander(ExpanderType type, int filter_effect_id);
weiliangc 2016/10/31 18:20:25 Is there an expander type that is not Filter that
ajuma 2016/10/31 18:28:05 Yeah, I believe there are other kinds of expanding
24 ClipExpander(const ClipExpander& other);
25
26 bool operator==(const ClipExpander& other) const;
27
28 bool operator!=(const ClipExpander& other) const { return !(*this == other); }
29
30 // Maps "forward" to determine which pixels in a destination rect are affected
31 // by pixels in the given source rect.
32 gfx::Rect MapRect(const gfx::Rect& rect,
33 const PropertyTrees* property_trees) const;
34
35 // Maps "backward" to determine which pixels in the source affect the pixels
36 // in the given destination rect.
37 gfx::Rect MapRectReverse(const gfx::Rect& rect,
38 const PropertyTrees* property_trees) const;
39
40 // The id of the effect node in whose transform space the expansion happens.
41 int target_effect_id() const { return target_effect_id_; }
42
43 private:
44 ExpanderType expander_type_;
45
46 int target_effect_id_;
47 };
48
49 } // namespace cc
50
51 #endif // CC_TREES_CLIP_EXPANDER_H_
OLDNEW
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/clip_expander.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698