| OLD | NEW |
| 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 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 5 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/layers/layer_lists.h" | 11 #include "cc/layers/layer_lists.h" |
| 12 #include "cc/test/fake_layer_tree_host_client.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace gfx { | 15 namespace gfx { |
| 15 class PointF; | 16 class PointF; |
| 16 class Point3F; | 17 class Point3F; |
| 17 class Size; | 18 class Size; |
| 18 class Transform; | 19 class Transform; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace cc { | 22 namespace cc { |
| 22 | 23 |
| 24 class FakeLayerTreeHost; |
| 23 class Layer; | 25 class Layer; |
| 24 class LayerImpl; | 26 class LayerImpl; |
| 25 class RenderSurfaceLayerList; | 27 class RenderSurfaceLayerList; |
| 26 | 28 |
| 27 class LayerTreeHostCommonTestBase { | 29 class LayerTreeHostCommonTestBase { |
| 28 protected: | 30 protected: |
| 29 LayerTreeHostCommonTestBase(); | 31 LayerTreeHostCommonTestBase(); |
| 30 virtual ~LayerTreeHostCommonTestBase(); | 32 virtual ~LayerTreeHostCommonTestBase(); |
| 31 | 33 |
| 32 template <typename LayerType> | 34 template <typename LayerType> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 111 } |
| 110 | 112 |
| 111 LayerImplList* render_surface_layer_list_impl() const { | 113 LayerImplList* render_surface_layer_list_impl() const { |
| 112 return render_surface_layer_list_impl_.get(); | 114 return render_surface_layer_list_impl_.get(); |
| 113 } | 115 } |
| 114 | 116 |
| 115 int render_surface_layer_list_count() const { | 117 int render_surface_layer_list_count() const { |
| 116 return render_surface_layer_list_count_; | 118 return render_surface_layer_list_count_; |
| 117 } | 119 } |
| 118 | 120 |
| 121 scoped_ptr<FakeLayerTreeHost> CreateFakeLayerTreeHost(); |
| 122 |
| 119 private: | 123 private: |
| 120 scoped_ptr<RenderSurfaceLayerList> render_surface_layer_list_; | 124 scoped_ptr<RenderSurfaceLayerList> render_surface_layer_list_; |
| 121 scoped_ptr<std::vector<LayerImpl*> > render_surface_layer_list_impl_; | 125 scoped_ptr<std::vector<LayerImpl*> > render_surface_layer_list_impl_; |
| 122 | 126 |
| 127 FakeLayerTreeHostClient client_; |
| 123 int render_surface_layer_list_count_; | 128 int render_surface_layer_list_count_; |
| 124 }; | 129 }; |
| 125 | 130 |
| 126 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, | 131 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, |
| 127 public testing::Test {}; | 132 public testing::Test {}; |
| 128 | 133 |
| 129 } // namespace cc | 134 } // namespace cc |
| 130 | 135 |
| 131 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 136 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| OLD | NEW |