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

Side by Side Diff: cc/layers/layer_iterator_unittest.cc

Issue 1736073002: cc: Move SyncedScrollOffset to scroll tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and add comment 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/layers/layer_impl_unittest.cc ('k') | cc/layers/picture_image_layer_impl.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/layer_iterator.h" 5 #include "cc/layers/layer_iterator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_layer_tree_host.h" 10 #include "cc/test/fake_layer_tree_host.h"
(...skipping 17 matching lines...) Expand all
28 return make_scoped_ptr(new TestLayerImpl(tree, id)); 28 return make_scoped_ptr(new TestLayerImpl(tree, id));
29 } 29 }
30 ~TestLayerImpl() override {} 30 ~TestLayerImpl() override {}
31 31
32 int count_representing_target_surface_; 32 int count_representing_target_surface_;
33 int count_representing_contributing_surface_; 33 int count_representing_contributing_surface_;
34 int count_representing_itself_; 34 int count_representing_itself_;
35 35
36 private: 36 private:
37 explicit TestLayerImpl(LayerTreeImpl* tree, int id) 37 explicit TestLayerImpl(LayerTreeImpl* tree, int id)
38 : LayerImpl(tree, id, new SyncedScrollOffset), 38 : LayerImpl(tree, id),
39 count_representing_target_surface_(-1), 39 count_representing_target_surface_(-1),
40 count_representing_contributing_surface_(-1), 40 count_representing_contributing_surface_(-1),
41 count_representing_itself_(-1) { 41 count_representing_itself_(-1) {
42 SetBounds(gfx::Size(100, 100)); 42 SetBounds(gfx::Size(100, 100));
43 SetPosition(gfx::PointF()); 43 SetPosition(gfx::PointF());
44 SetDrawsContent(true); 44 SetDrawsContent(true);
45 } 45 }
46 }; 46 };
47 47
48 #define EXPECT_COUNT(layer, target, contrib, itself) \ 48 #define EXPECT_COUNT(layer, target, contrib, itself) \
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 EXPECT_COUNT(root21_ptr, -1, -1, 9); 253 EXPECT_COUNT(root21_ptr, -1, -1, 9);
254 EXPECT_COUNT(root22_ptr, 7, 8, 6); 254 EXPECT_COUNT(root22_ptr, 7, 8, 6);
255 EXPECT_COUNT(root221_ptr, -1, -1, 5); 255 EXPECT_COUNT(root221_ptr, -1, -1, 5);
256 EXPECT_COUNT(root23_ptr, 3, 4, 2); 256 EXPECT_COUNT(root23_ptr, 3, 4, 2);
257 EXPECT_COUNT(root231_ptr, -1, -1, 1); 257 EXPECT_COUNT(root231_ptr, -1, -1, 1);
258 EXPECT_COUNT(root3_ptr, -1, -1, 0); 258 EXPECT_COUNT(root3_ptr, -1, -1, 0);
259 } 259 }
260 260
261 } // namespace 261 } // namespace
262 } // namespace cc 262 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/picture_image_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698