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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « cc/proto/cc_conversions.h ('k') | cc/proto/property_tree.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/proto/cc_conversions.h" 5 #include "cc/proto/cc_conversions.h"
6 6
7 #include "cc/base/region.h" 7 #include "cc/base/region.h"
8 #include "cc/proto/gfx_conversions.h" 8 #include "cc/proto/gfx_conversions.h"
9 #include "cc/proto/region.pb.h" 9 #include "cc/proto/region.pb.h"
10 10
(...skipping 27 matching lines...) Expand all
38 proto) { 38 proto) {
39 switch (proto) { 39 switch (proto) {
40 case proto::SolidColorScrollbarLayerProperties::HORIZONTAL: 40 case proto::SolidColorScrollbarLayerProperties::HORIZONTAL:
41 return ScrollbarOrientation::HORIZONTAL; 41 return ScrollbarOrientation::HORIZONTAL;
42 case proto::SolidColorScrollbarLayerProperties::VERTICAL: 42 case proto::SolidColorScrollbarLayerProperties::VERTICAL:
43 return ScrollbarOrientation::VERTICAL; 43 return ScrollbarOrientation::VERTICAL;
44 } 44 }
45 return ScrollbarOrientation::HORIZONTAL; 45 return ScrollbarOrientation::HORIZONTAL;
46 } 46 }
47 47
48 proto::ClipNodeData::ClipType ClipNodeTypeToProto(
49 const ClipNode::ClipType& clip_type) {
50 switch (clip_type) {
51 case ClipNode::ClipType::NONE:
52 return proto::ClipNodeData::NONE;
53 case ClipNode::ClipType::APPLIES_LOCAL_CLIP:
54 return proto::ClipNodeData::APPLIES_LOCAL_CLIP;
55 }
56 NOTREACHED();
57 return proto::ClipNodeData::NONE;
58 }
59
60 ClipNode::ClipType ClipNodeTypeFromProto(
61 const proto::ClipNodeData::ClipType& clip_type) {
62 switch (clip_type) {
63 case proto::ClipNodeData::NONE:
64 return ClipNode::ClipType::NONE;
65 case proto::ClipNodeData::APPLIES_LOCAL_CLIP:
66 return ClipNode::ClipType::APPLIES_LOCAL_CLIP;
67 }
68 NOTREACHED();
69 return ClipNode::ClipType::NONE;
70 }
71
48 } // namespace cc 72 } // namespace cc
OLDNEW
« 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