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

Unified Diff: cc/trees/clip_node.h

Issue 2437923002: cc: Change ClipNode::applies_local_clip to a clip_type enum (Closed)
Patch Set: Fix Windows build Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/clip_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/clip_node.h
diff --git a/cc/trees/clip_node.h b/cc/trees/clip_node.h
index e9dfede834202526d866c5baa6452387d16163c3..fe315d460528f20b3e10a66d55842edbe5dffe93 100644
--- a/cc/trees/clip_node.h
+++ b/cc/trees/clip_node.h
@@ -28,11 +28,22 @@ struct CC_EXPORT ClipNode {
int parent_id;
int owner_id;
+ enum class ClipType {
+ // The node doesn't contribute a new clip. It exists only for caching clips
+ // or for resetting clipping state.
+ NONE,
+
+ // The node contributes a new clip (that is, |clip| needs to be applied).
+ APPLIES_LOCAL_CLIP
+ };
+
+ ClipType clip_type;
+
// The clip rect that this node contributes, expressed in the space of its
// transform node.
gfx::RectF clip;
- // Clip nodes are uses for two reasons. First, they are used for determining
+ // 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
// so, the rect that needs to be used. These can be different since not all
@@ -54,10 +65,6 @@ struct CC_EXPORT ClipNode {
// The id of the effect node that defines the clip node's target space.
int target_effect_id;
- // Whether this node contributes a new clip (that is, whether |clip| needs to
- // be applied), rather than only inheriting ancestor clips.
- bool applies_local_clip : 1;
-
// When true, |clip_in_target_space| does not include clips from ancestor
// nodes.
bool layer_clipping_uses_only_local_clip : 1;
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/clip_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698