| 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 20 matching lines...) Expand all Loading... |
| 31 int count_representing_contributing_surface_; | 31 int count_representing_contributing_surface_; |
| 32 int count_representing_itself_; | 32 int count_representing_itself_; |
| 33 | 33 |
| 34 virtual bool DrawsContent() const OVERRIDE { return draws_content_; } | 34 virtual bool DrawsContent() const OVERRIDE { return draws_content_; } |
| 35 void set_draws_content(bool draws_content) { draws_content_ = draws_content; } | 35 void set_draws_content(bool draws_content) { draws_content_ = draws_content; } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 TestLayer() : Layer(), draws_content_(true) { | 38 TestLayer() : Layer(), draws_content_(true) { |
| 39 SetBounds(gfx::Size(100, 100)); | 39 SetBounds(gfx::Size(100, 100)); |
| 40 SetPosition(gfx::Point()); | 40 SetPosition(gfx::Point()); |
| 41 SetAnchorPoint(gfx::Point()); | 41 SetTransformOrigin(gfx::Point3F()); |
| 42 } | 42 } |
| 43 virtual ~TestLayer() {} | 43 virtual ~TestLayer() {} |
| 44 | 44 |
| 45 bool draws_content_; | 45 bool draws_content_; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 #define EXPECT_COUNT(layer, target, contrib, itself) \ | 48 #define EXPECT_COUNT(layer, target, contrib, itself) \ |
| 49 EXPECT_EQ(target, layer->count_representing_target_surface_); \ | 49 EXPECT_EQ(target, layer->count_representing_target_surface_); \ |
| 50 EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \ | 50 EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \ |
| 51 EXPECT_EQ(itself, layer->count_representing_itself_); | 51 EXPECT_EQ(itself, layer->count_representing_itself_); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 EXPECT_COUNT(root21, -1, -1, 9); | 208 EXPECT_COUNT(root21, -1, -1, 9); |
| 209 EXPECT_COUNT(root22, 7, 8, 6); | 209 EXPECT_COUNT(root22, 7, 8, 6); |
| 210 EXPECT_COUNT(root221, -1, -1, 5); | 210 EXPECT_COUNT(root221, -1, -1, 5); |
| 211 EXPECT_COUNT(root23, 3, 4, 2); | 211 EXPECT_COUNT(root23, 3, 4, 2); |
| 212 EXPECT_COUNT(root231, -1, -1, 1); | 212 EXPECT_COUNT(root231, -1, -1, 1); |
| 213 EXPECT_COUNT(root3, -1, -1, 0); | 213 EXPECT_COUNT(root3, -1, -1, 0); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace | 216 } // namespace |
| 217 } // namespace cc | 217 } // namespace cc |
| OLD | NEW |