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/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2300 | 2300 |
2301 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferCommits); | 2301 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferCommits); |
2302 | 2302 |
2303 class LayerTreeHostWithProxy : public LayerTreeHost { | 2303 class LayerTreeHostWithProxy : public LayerTreeHost { |
2304 public: | 2304 public: |
2305 LayerTreeHostWithProxy(FakeLayerTreeHostClient* client, | 2305 LayerTreeHostWithProxy(FakeLayerTreeHostClient* client, |
2306 const LayerTreeSettings& settings, | 2306 const LayerTreeSettings& settings, |
2307 scoped_ptr<FakeProxy> proxy) | 2307 scoped_ptr<FakeProxy> proxy) |
2308 : LayerTreeHost(client, NULL, settings) { | 2308 : LayerTreeHost(client, NULL, settings) { |
2309 proxy->SetLayerTreeHost(this); | 2309 proxy->SetLayerTreeHost(this); |
2310 EXPECT_TRUE(InitializeForTesting(proxy.PassAs<Proxy>())); | 2310 InitializeForTesting(proxy.PassAs<Proxy>()); |
2311 } | 2311 } |
2312 }; | 2312 }; |
2313 | 2313 |
2314 TEST(LayerTreeHostTest, LimitPartialUpdates) { | 2314 TEST(LayerTreeHostTest, LimitPartialUpdates) { |
2315 // When partial updates are not allowed, max updates should be 0. | 2315 // When partial updates are not allowed, max updates should be 0. |
2316 { | 2316 { |
2317 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); | 2317 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); |
2318 | 2318 |
2319 scoped_ptr<FakeProxy> proxy(new FakeProxy); | 2319 scoped_ptr<FakeProxy> proxy(new FakeProxy); |
2320 proxy->GetRendererCapabilities().allow_partial_texture_updates = false; | 2320 proxy->GetRendererCapabilities().allow_partial_texture_updates = false; |
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5209 size_t second_output_surface_memory_limit_; | 5209 size_t second_output_surface_memory_limit_; |
5210 FakeContentLayerClient client_; | 5210 FakeContentLayerClient client_; |
5211 scoped_refptr<FakeContentLayer> root_; | 5211 scoped_refptr<FakeContentLayer> root_; |
5212 }; | 5212 }; |
5213 | 5213 |
5214 // No output to copy for delegated renderers. | 5214 // No output to copy for delegated renderers. |
5215 SINGLE_AND_MULTI_THREAD_TEST_F( | 5215 SINGLE_AND_MULTI_THREAD_TEST_F( |
5216 LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface); | 5216 LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface); |
5217 | 5217 |
5218 } // namespace cc | 5218 } // namespace cc |
OLD | NEW |