| Index: cc/trees/clip_node.h
|
| diff --git a/cc/trees/clip_node.h b/cc/trees/clip_node.h
|
| index ca1156d12688a2365de72a7072c0f87c4f6c9a20..b81c72c235eb4775963127db161c0ec9dcdfa440 100644
|
| --- a/cc/trees/clip_node.h
|
| +++ b/cc/trees/clip_node.h
|
| @@ -5,7 +5,10 @@
|
| #ifndef CC_TREES_CLIP_NODE_H_
|
| #define CC_TREES_CLIP_NODE_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "cc/base/cc_export.h"
|
| +#include "cc/trees/clip_expander.h"
|
| #include "ui/gfx/geometry/rect_f.h"
|
|
|
| namespace base {
|
| @@ -20,6 +23,10 @@ struct CC_EXPORT ClipNode {
|
| ClipNode();
|
| ClipNode(const ClipNode& other);
|
|
|
| + ClipNode& operator=(const ClipNode& other);
|
| +
|
| + ~ClipNode();
|
| +
|
| // The node index of this node in the clip tree node vector.
|
| int id;
|
| // The node index of the parent node in the clip tree node vector.
|
| @@ -33,7 +40,15 @@ struct CC_EXPORT ClipNode {
|
| NONE,
|
|
|
| // The node contributes a new clip (that is, |clip| needs to be applied).
|
| - APPLIES_LOCAL_CLIP
|
| + APPLIES_LOCAL_CLIP,
|
| +
|
| + // This node represents a space expansion. When computing visible rects,
|
| + // the accumulated clip inherited by this node gets expanded. Similarly,
|
| + // when mapping a rect in descendant space to the rect in ancestor space
|
| + // that depends on the descendant rect's contents, this node expands the
|
| + // descendant rect. This is used for effects like pixel-moving filters,
|
| + // where clipped-out content can affect visible output.
|
| + EXPANDS_CLIP
|
| };
|
|
|
| ClipType clip_type;
|
| @@ -42,6 +57,9 @@ struct CC_EXPORT ClipNode {
|
| // transform node.
|
| gfx::RectF clip;
|
|
|
| + // For nodes that expand, this represents the amount of expansion.
|
| + std::unique_ptr<ClipExpander> clip_expander;
|
| +
|
| // Clip nodes are used for two reasons. First, they are used for determining
|
| // which parts of each layer are visible. Second, they are used for
|
| // determining whether a clip needs to be applied when drawing a layer, and if
|
|
|