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

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

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/trees/property_tree.h ('k') | chrome/browser/ui/input_method/input_method_engine_base.h » ('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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 DCHECK(proto.has_property_type()); 1304 DCHECK(proto.has_property_type());
1305 DCHECK_EQ(proto.property_type(), proto::PropertyTree::Effect); 1305 DCHECK_EQ(proto.property_type(), proto::PropertyTree::Effect);
1306 1306
1307 PropertyTree::FromProtobuf(proto); 1307 PropertyTree::FromProtobuf(proto);
1308 } 1308 }
1309 1309
1310 ScrollTree::ScrollTree() 1310 ScrollTree::ScrollTree()
1311 : currently_scrolling_node_id_(-1), 1311 : currently_scrolling_node_id_(-1),
1312 layer_id_to_scroll_offset_map_(ScrollTree::ScrollOffsetMap()) {} 1312 layer_id_to_scroll_offset_map_(ScrollTree::ScrollOffsetMap()) {}
1313 1313
1314 ScrollTree::ScrollTree(const ScrollTree& other) = default;
1315
1314 ScrollTree::~ScrollTree() {} 1316 ScrollTree::~ScrollTree() {}
1315 1317
1316 ScrollTree& ScrollTree::operator=(const ScrollTree& from) { 1318 ScrollTree& ScrollTree::operator=(const ScrollTree& from) {
1317 PropertyTree::operator=(from); 1319 PropertyTree::operator=(from);
1318 currently_scrolling_node_id_ = -1; 1320 currently_scrolling_node_id_ = -1;
1319 // layer_id_to_scroll_offset_map_ is intentionally omitted in operator=, 1321 // layer_id_to_scroll_offset_map_ is intentionally omitted in operator=,
1320 // because we do not want to simply copy the map when property tree is 1322 // because we do not want to simply copy the map when property tree is
1321 // propagating from pending to active. 1323 // propagating from pending to active.
1322 // In the main to pending case, we do want to copy it, but this can be done by 1324 // In the main to pending case, we do want to copy it, but this can be done by
1323 // calling UpdateScrollOffsetMap after the assignment; 1325 // calling UpdateScrollOffsetMap after the assignment;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 full_tree_damaged(false), 1715 full_tree_damaged(false),
1714 sequence_number(0), 1716 sequence_number(0),
1715 is_main_thread(true), 1717 is_main_thread(true),
1716 is_active(false) { 1718 is_active(false) {
1717 transform_tree.SetPropertyTrees(this); 1719 transform_tree.SetPropertyTrees(this);
1718 effect_tree.SetPropertyTrees(this); 1720 effect_tree.SetPropertyTrees(this);
1719 clip_tree.SetPropertyTrees(this); 1721 clip_tree.SetPropertyTrees(this);
1720 scroll_tree.SetPropertyTrees(this); 1722 scroll_tree.SetPropertyTrees(this);
1721 } 1723 }
1722 1724
1725 PropertyTrees::PropertyTrees(const PropertyTrees& other) = default;
1726
1723 PropertyTrees::~PropertyTrees() {} 1727 PropertyTrees::~PropertyTrees() {}
1724 1728
1725 bool PropertyTrees::operator==(const PropertyTrees& other) const { 1729 bool PropertyTrees::operator==(const PropertyTrees& other) const {
1726 return transform_tree == other.transform_tree && 1730 return transform_tree == other.transform_tree &&
1727 effect_tree == other.effect_tree && clip_tree == other.clip_tree && 1731 effect_tree == other.effect_tree && clip_tree == other.clip_tree &&
1728 scroll_tree == other.scroll_tree && 1732 scroll_tree == other.scroll_tree &&
1729 needs_rebuild == other.needs_rebuild && changed == other.changed && 1733 needs_rebuild == other.needs_rebuild && changed == other.changed &&
1730 full_tree_damaged == other.full_tree_damaged && 1734 full_tree_damaged == other.full_tree_damaged &&
1731 is_main_thread == other.is_main_thread && 1735 is_main_thread == other.is_main_thread &&
1732 is_active == other.is_active && 1736 is_active == other.is_active &&
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 break; 1854 break;
1851 case ALL_TREES: 1855 case ALL_TREES:
1852 transform_tree.ResetChangeTracking(); 1856 transform_tree.ResetChangeTracking();
1853 effect_tree.ResetChangeTracking(); 1857 effect_tree.ResetChangeTracking();
1854 } 1858 }
1855 changed = false; 1859 changed = false;
1856 full_tree_damaged = false; 1860 full_tree_damaged = false;
1857 } 1861 }
1858 1862
1859 } // namespace cc 1863 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/property_tree.h ('k') | chrome/browser/ui/input_method/input_method_engine_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698