| 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 "cc/test/fake_layer_tree_host_client.h" |
| 13 #include "cc/trees/property_tree.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 15 |
| 15 namespace gfx { | 16 namespace gfx { |
| 16 class PointF; | 17 class PointF; |
| 17 class Point3F; | 18 class Point3F; |
| 18 class Size; | 19 class Size; |
| 19 class Transform; | 20 class Transform; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace cc { | 23 namespace cc { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 template <class LayerType> | 98 template <class LayerType> |
| 98 void ExecuteCalculateDrawProperties(LayerType* root_layer, | 99 void ExecuteCalculateDrawProperties(LayerType* root_layer, |
| 99 float device_scale_factor, | 100 float device_scale_factor, |
| 100 float page_scale_factor, | 101 float page_scale_factor, |
| 101 LayerType* page_scale_application_layer) { | 102 LayerType* page_scale_application_layer) { |
| 102 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, | 103 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, |
| 103 page_scale_factor, | 104 page_scale_factor, |
| 104 page_scale_application_layer, false, false); | 105 page_scale_application_layer, false, false); |
| 105 } | 106 } |
| 106 | 107 |
| 108 void ExecuteCalculateDrawPropertiesWithPropertyTrees(Layer* layer); |
| 109 void ExecuteCalculateDrawPropertiesWithPropertyTrees(LayerImpl* layer); |
| 110 |
| 107 RenderSurfaceLayerList* render_surface_layer_list() const { | 111 RenderSurfaceLayerList* render_surface_layer_list() const { |
| 108 return render_surface_layer_list_.get(); | 112 return render_surface_layer_list_.get(); |
| 109 } | 113 } |
| 110 | 114 |
| 111 LayerImplList* render_surface_layer_list_impl() const { | 115 LayerImplList* render_surface_layer_list_impl() const { |
| 112 return render_surface_layer_list_impl_.get(); | 116 return render_surface_layer_list_impl_.get(); |
| 113 } | 117 } |
| 114 | 118 |
| 115 int render_surface_layer_list_count() const { | 119 int render_surface_layer_list_count() const { |
| 116 return render_surface_layer_list_count_; | 120 return render_surface_layer_list_count_; |
| 117 } | 121 } |
| 118 | 122 |
| 119 scoped_ptr<FakeLayerTreeHost> CreateFakeLayerTreeHost(); | 123 scoped_ptr<FakeLayerTreeHost> CreateFakeLayerTreeHost(); |
| 120 | 124 |
| 121 private: | 125 private: |
| 122 scoped_ptr<RenderSurfaceLayerList> render_surface_layer_list_; | 126 scoped_ptr<RenderSurfaceLayerList> render_surface_layer_list_; |
| 123 scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_; | 127 scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_; |
| 124 | 128 |
| 125 FakeLayerTreeHostClient client_; | 129 FakeLayerTreeHostClient client_; |
| 126 int render_surface_layer_list_count_; | 130 int render_surface_layer_list_count_; |
| 127 }; | 131 }; |
| 128 | 132 |
| 129 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, | 133 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, |
| 130 public testing::Test {}; | 134 public testing::Test {}; |
| 131 | 135 |
| 132 } // namespace cc | 136 } // namespace cc |
| 133 | 137 |
| 134 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 138 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| OLD | NEW |