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

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

Issue 2423483003: cc: Make visible rect computation aware of pixel-moving filters (Closed)
Patch Set: It's 2017 -- update copyright for new files Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/layers/render_surface_impl.cc ('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 2017 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 cc {
12
13 class PropertyTrees;
14
15 class CC_EXPORT ClipExpander {
16 public:
17 explicit ClipExpander(int filter_effect_id);
18 ClipExpander(const ClipExpander& other);
19
20 bool operator==(const ClipExpander& other) const;
21
22 bool operator!=(const ClipExpander& other) const { return !(*this == other); }
23
24 // Maps "forward" to determine which pixels in a destination rect are affected
25 // by pixels in the given source rect.
26 gfx::Rect MapRect(const gfx::Rect& rect,
27 const PropertyTrees* property_trees) const;
28
29 // Maps "backward" to determine which pixels in the source affect the pixels
30 // in the given destination rect.
31 gfx::Rect MapRectReverse(const gfx::Rect& rect,
32 const PropertyTrees* property_trees) const;
33
34 // The id of the effect node in whose transform space the expansion happens.
35 int target_effect_id() const { return target_effect_id_; }
36
37 private:
38 int target_effect_id_;
39 };
40
41 } // namespace cc
42
43 #endif // CC_TREES_CLIP_EXPANDER_H_
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/clip_expander.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698