| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 | 2143 |
| 2144 class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted | 2144 class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted |
| 2145 : public LayerTreeHostTest { | 2145 : public LayerTreeHostTest { |
| 2146 public: | 2146 public: |
| 2147 LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted() | 2147 LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted() |
| 2148 : root_layer_(FakeContentLayer::Create(&client_)), | 2148 : root_layer_(FakeContentLayer::Create(&client_)), |
| 2149 child_layer1_(FakeContentLayer::Create(&client_)), | 2149 child_layer1_(FakeContentLayer::Create(&client_)), |
| 2150 child_layer2_(FakeContentLayer::Create(&client_)), | 2150 child_layer2_(FakeContentLayer::Create(&client_)), |
| 2151 num_commits_(0) {} | 2151 num_commits_(0) {} |
| 2152 | 2152 |
| 2153 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
| 2154 settings->impl_side_painting = false; |
| 2155 } |
| 2156 |
| 2153 virtual void BeginTest() OVERRIDE { | 2157 virtual void BeginTest() OVERRIDE { |
| 2154 layer_tree_host()->SetViewportSize(gfx::Size(100, 100)); | 2158 layer_tree_host()->SetViewportSize(gfx::Size(100, 100)); |
| 2155 root_layer_->SetBounds(gfx::Size(100, 100)); | 2159 root_layer_->SetBounds(gfx::Size(100, 100)); |
| 2156 child_layer1_->SetBounds(gfx::Size(100, 100)); | 2160 child_layer1_->SetBounds(gfx::Size(100, 100)); |
| 2157 child_layer2_->SetBounds(gfx::Size(100, 100)); | 2161 child_layer2_->SetBounds(gfx::Size(100, 100)); |
| 2158 root_layer_->AddChild(child_layer1_); | 2162 root_layer_->AddChild(child_layer1_); |
| 2159 root_layer_->AddChild(child_layer2_); | 2163 root_layer_->AddChild(child_layer2_); |
| 2160 layer_tree_host()->SetRootLayer(root_layer_); | 2164 layer_tree_host()->SetRootLayer(root_layer_); |
| 2161 PostSetNeedsCommitToMainThread(); | 2165 PostSetNeedsCommitToMainThread(); |
| 2162 } | 2166 } |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2950 private: | 2954 private: |
| 2951 FakeContentLayerClient client_; | 2955 FakeContentLayerClient client_; |
| 2952 scoped_refptr<FakePictureLayer> layer_; | 2956 scoped_refptr<FakePictureLayer> layer_; |
| 2953 bool initialized_gl_; | 2957 bool initialized_gl_; |
| 2954 }; | 2958 }; |
| 2955 | 2959 |
| 2956 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); | 2960 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); |
| 2957 | 2961 |
| 2958 } // namespace | 2962 } // namespace |
| 2959 } // namespace cc | 2963 } // namespace cc |
| OLD | NEW |