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

Unified Diff: cc/proto/cc_conversions.cc

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/cc_conversions.h ('k') | cc/proto/property_tree.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/proto/cc_conversions.cc
diff --git a/cc/proto/cc_conversions.cc b/cc/proto/cc_conversions.cc
index 92da5634e2ef596a31334f01f237d30b50ef473b..549efbef7cc59350df93ecdcd4311c09784af5af 100644
--- a/cc/proto/cc_conversions.cc
+++ b/cc/proto/cc_conversions.cc
@@ -45,4 +45,28 @@ ScrollbarOrientation ScrollbarOrientationFromProto(
return ScrollbarOrientation::HORIZONTAL;
}
+proto::ClipNodeData::ClipType ClipNodeTypeToProto(
+ const ClipNode::ClipType& clip_type) {
+ switch (clip_type) {
+ case ClipNode::ClipType::NONE:
+ return proto::ClipNodeData::NONE;
+ case ClipNode::ClipType::APPLIES_LOCAL_CLIP:
+ return proto::ClipNodeData::APPLIES_LOCAL_CLIP;
+ }
+ NOTREACHED();
+ return proto::ClipNodeData::NONE;
+}
+
+ClipNode::ClipType ClipNodeTypeFromProto(
+ const proto::ClipNodeData::ClipType& clip_type) {
+ switch (clip_type) {
+ case proto::ClipNodeData::NONE:
+ return ClipNode::ClipType::NONE;
+ case proto::ClipNodeData::APPLIES_LOCAL_CLIP:
+ return ClipNode::ClipType::APPLIES_LOCAL_CLIP;
+ }
+ NOTREACHED();
+ return ClipNode::ClipType::NONE;
+}
+
} // namespace cc
« no previous file with comments | « cc/proto/cc_conversions.h ('k') | cc/proto/property_tree.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698