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

Side by Side Diff: cc/proto/cc_conversions.cc

Issue 2423483003: cc: Make visible rect computation aware of pixel-moving filters (Closed)
Patch Set: Rebaseline Created 4 years, 1 month 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
55 } 57 }
56 NOTREACHED(); 58 NOTREACHED();
57 return proto::ClipNodeData::NONE; 59 return proto::ClipNodeData::NONE;
58 } 60 }
59 61
60 ClipNode::ClipType ClipNodeTypeFromProto( 62 ClipNode::ClipType ClipNodeTypeFromProto(
61 const proto::ClipNodeData::ClipType& clip_type) { 63 const proto::ClipNodeData::ClipType& clip_type) {
62 switch (clip_type) { 64 switch (clip_type) {
63 case proto::ClipNodeData::NONE: 65 case proto::ClipNodeData::NONE:
64 return ClipNode::ClipType::NONE; 66 return ClipNode::ClipType::NONE;
65 case proto::ClipNodeData::APPLIES_LOCAL_CLIP: 67 case proto::ClipNodeData::APPLIES_LOCAL_CLIP:
66 return ClipNode::ClipType::APPLIES_LOCAL_CLIP; 68 return ClipNode::ClipType::APPLIES_LOCAL_CLIP;
69 case proto::ClipNodeData::EXPANDS_CLIP:
70 return ClipNode::ClipType::EXPANDS_CLIP;
67 } 71 }
68 NOTREACHED(); 72 NOTREACHED();
69 return ClipNode::ClipType::NONE; 73 return ClipNode::ClipType::NONE;
70 } 74 }
71 75
72 } // namespace cc 76 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698