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

Side by Side Diff: cc/trees/property_tree.cc

Issue 1499793003: Fix classes that have too many virtuals for inline constructors. Base URL: https://chromium.googlesource.com/chromium/src.git@enable-virtuals-as-complexity
Patch Set: Finish fixing the codebase that's accessible from Linux. Created 5 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <set> 5 #include <set>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/proto/gfx_conversions.h" 10 #include "cc/proto/gfx_conversions.h"
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 TransformNode* node, 1032 TransformNode* node,
1033 TransformNode* parent_node) { 1033 TransformNode* parent_node) {
1034 node->data.node_and_ancestors_have_only_integer_translation = 1034 node->data.node_and_ancestors_have_only_integer_translation =
1035 node->data.to_parent.IsIdentityOrIntegerTranslation(); 1035 node->data.to_parent.IsIdentityOrIntegerTranslation();
1036 if (parent_node) 1036 if (parent_node)
1037 node->data.node_and_ancestors_have_only_integer_translation = 1037 node->data.node_and_ancestors_have_only_integer_translation =
1038 node->data.node_and_ancestors_have_only_integer_translation && 1038 node->data.node_and_ancestors_have_only_integer_translation &&
1039 parent_node->data.node_and_ancestors_have_only_integer_translation; 1039 parent_node->data.node_and_ancestors_have_only_integer_translation;
1040 } 1040 }
1041 1041
1042 ClipTree::ClipTree() = default;
1043
1042 void ClipTree::SetViewportClip(gfx::RectF viewport_rect) { 1044 void ClipTree::SetViewportClip(gfx::RectF viewport_rect) {
1043 if (size() < 2) 1045 if (size() < 2)
1044 return; 1046 return;
1045 ClipNode* node = Node(1); 1047 ClipNode* node = Node(1);
1046 if (viewport_rect == node->data.clip) 1048 if (viewport_rect == node->data.clip)
1047 return; 1049 return;
1048 node->data.clip = viewport_rect; 1050 node->data.clip = viewport_rect;
1049 set_needs_update(true); 1051 set_needs_update(true);
1050 } 1052 }
1051 1053
(...skipping 14 matching lines...) Expand all
1066 PropertyTree::ToProtobuf(proto); 1068 PropertyTree::ToProtobuf(proto);
1067 } 1069 }
1068 1070
1069 void ClipTree::FromProtobuf(const proto::PropertyTree& proto) { 1071 void ClipTree::FromProtobuf(const proto::PropertyTree& proto) {
1070 DCHECK(proto.has_property_type()); 1072 DCHECK(proto.has_property_type());
1071 DCHECK_EQ(proto.property_type(), proto::PropertyTree::Clip); 1073 DCHECK_EQ(proto.property_type(), proto::PropertyTree::Clip);
1072 1074
1073 PropertyTree::FromProtobuf(proto); 1075 PropertyTree::FromProtobuf(proto);
1074 } 1076 }
1075 1077
1078 EffectTree::EffectTree() = default;
1079
1076 bool EffectTree::operator==(const EffectTree& other) const { 1080 bool EffectTree::operator==(const EffectTree& other) const {
1077 return PropertyTree::operator==(other); 1081 return PropertyTree::operator==(other);
1078 } 1082 }
1079 1083
1080 void EffectTree::ToProtobuf(proto::PropertyTree* proto) const { 1084 void EffectTree::ToProtobuf(proto::PropertyTree* proto) const {
1081 DCHECK(!proto->has_property_type()); 1085 DCHECK(!proto->has_property_type());
1082 proto->set_property_type(proto::PropertyTree::Effect); 1086 proto->set_property_type(proto::PropertyTree::Effect);
1083 1087
1084 PropertyTree::ToProtobuf(proto); 1088 PropertyTree::ToProtobuf(proto);
1085 } 1089 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 transform_tree.FromProtobuf(proto.transform_tree()); 1127 transform_tree.FromProtobuf(proto.transform_tree());
1124 effect_tree.FromProtobuf(proto.effect_tree()); 1128 effect_tree.FromProtobuf(proto.effect_tree());
1125 clip_tree.FromProtobuf(proto.clip_tree()); 1129 clip_tree.FromProtobuf(proto.clip_tree());
1126 1130
1127 needs_rebuild = proto.needs_rebuild(); 1131 needs_rebuild = proto.needs_rebuild();
1128 non_root_surfaces_enabled = proto.non_root_surfaces_enabled(); 1132 non_root_surfaces_enabled = proto.non_root_surfaces_enabled();
1129 sequence_number = proto.sequence_number(); 1133 sequence_number = proto.sequence_number();
1130 } 1134 }
1131 1135
1132 } // namespace cc 1136 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698