| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 return ScrollbarOrientation::HORIZONTAL; | 45 return ScrollbarOrientation::HORIZONTAL; |
| 46 } | 46 } |
| 47 | 47 |
| 48 proto::ClipNodeData::ClipType ClipNodeTypeToProto( | 48 proto::ClipNodeData::ClipType ClipNodeTypeToProto( |
| 49 const ClipNode::ClipType& clip_type) { | 49 const ClipNode::ClipType& clip_type) { |
| 50 switch (clip_type) { | 50 switch (clip_type) { |
| 51 case ClipNode::ClipType::NONE: | 51 case ClipNode::ClipType::NONE: |
| 52 return proto::ClipNodeData::NONE; | 52 return proto::ClipNodeData::NONE; |
| 53 case ClipNode::ClipType::APPLIES_LOCAL_CLIP: | 53 case ClipNode::ClipType::APPLIES_LOCAL_CLIP: |
| 54 return proto::ClipNodeData::APPLIES_LOCAL_CLIP; | 54 return proto::ClipNodeData::APPLIES_LOCAL_CLIP; |
| 55 case ClipNode::ClipType::EXPANDS_CLIP: | |
| 56 return proto::ClipNodeData::EXPANDS_CLIP; | |
| 57 } | 55 } |
| 58 NOTREACHED(); | 56 NOTREACHED(); |
| 59 return proto::ClipNodeData::NONE; | 57 return proto::ClipNodeData::NONE; |
| 60 } | 58 } |
| 61 | 59 |
| 62 ClipNode::ClipType ClipNodeTypeFromProto( | 60 ClipNode::ClipType ClipNodeTypeFromProto( |
| 63 const proto::ClipNodeData::ClipType& clip_type) { | 61 const proto::ClipNodeData::ClipType& clip_type) { |
| 64 switch (clip_type) { | 62 switch (clip_type) { |
| 65 case proto::ClipNodeData::NONE: | 63 case proto::ClipNodeData::NONE: |
| 66 return ClipNode::ClipType::NONE; | 64 return ClipNode::ClipType::NONE; |
| 67 case proto::ClipNodeData::APPLIES_LOCAL_CLIP: | 65 case proto::ClipNodeData::APPLIES_LOCAL_CLIP: |
| 68 return ClipNode::ClipType::APPLIES_LOCAL_CLIP; | 66 return ClipNode::ClipType::APPLIES_LOCAL_CLIP; |
| 69 case proto::ClipNodeData::EXPANDS_CLIP: | |
| 70 return ClipNode::ClipType::EXPANDS_CLIP; | |
| 71 } | 67 } |
| 72 NOTREACHED(); | 68 NOTREACHED(); |
| 73 return ClipNode::ClipType::NONE; | 69 return ClipNode::ClipType::NONE; |
| 74 } | 70 } |
| 75 | 71 |
| 76 } // namespace cc | 72 } // namespace cc |
| OLD | NEW |