| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |