| 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 13 matching lines...) Expand all Loading... |
| 24 class TestLayer : public Layer { | 24 class TestLayer : public Layer { |
| 25 public: | 25 public: |
| 26 static scoped_refptr<TestLayer> Create() { | 26 static scoped_refptr<TestLayer> Create() { |
| 27 return make_scoped_refptr(new TestLayer()); | 27 return make_scoped_refptr(new TestLayer()); |
| 28 } | 28 } |
| 29 | 29 |
| 30 int count_representing_target_surface_; | 30 int count_representing_target_surface_; |
| 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 } | 41 } |
| 42 virtual ~TestLayer() {} | 42 virtual ~TestLayer() {} |
| 43 | 43 |
| 44 bool draws_content_; | 44 bool draws_content_; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 EXPECT_COUNT(root21, -1, -1, 9); | 210 EXPECT_COUNT(root21, -1, -1, 9); |
| 211 EXPECT_COUNT(root22, 7, 8, 6); | 211 EXPECT_COUNT(root22, 7, 8, 6); |
| 212 EXPECT_COUNT(root221, -1, -1, 5); | 212 EXPECT_COUNT(root221, -1, -1, 5); |
| 213 EXPECT_COUNT(root23, 3, 4, 2); | 213 EXPECT_COUNT(root23, 3, 4, 2); |
| 214 EXPECT_COUNT(root231, -1, -1, 1); | 214 EXPECT_COUNT(root231, -1, -1, 1); |
| 215 EXPECT_COUNT(root3, -1, -1, 0); | 215 EXPECT_COUNT(root3, -1, -1, 0); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace | 218 } // namespace |
| 219 } // namespace cc | 219 } // namespace cc |
| OLD | NEW |