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 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2301 | 2301 |
2302 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferCommits); | 2302 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferCommits); |
2303 | 2303 |
2304 class LayerTreeHostWithProxy : public LayerTreeHost { | 2304 class LayerTreeHostWithProxy : public LayerTreeHost { |
2305 public: | 2305 public: |
2306 LayerTreeHostWithProxy(FakeLayerTreeHostClient* client, | 2306 LayerTreeHostWithProxy(FakeLayerTreeHostClient* client, |
2307 const LayerTreeSettings& settings, | 2307 const LayerTreeSettings& settings, |
2308 scoped_ptr<FakeProxy> proxy) | 2308 scoped_ptr<FakeProxy> proxy) |
2309 : LayerTreeHost(client, NULL, settings) { | 2309 : LayerTreeHost(client, NULL, settings) { |
2310 proxy->SetLayerTreeHost(this); | 2310 proxy->SetLayerTreeHost(this); |
2311 InitializeForTesting(proxy.PassAs<Proxy>()); | 2311 EXPECT_TRUE(InitializeForTesting(proxy.PassAs<Proxy>())); |
2312 } | 2312 } |
2313 }; | 2313 }; |
2314 | 2314 |
2315 TEST(LayerTreeHostTest, LimitPartialUpdates) { | 2315 TEST(LayerTreeHostTest, LimitPartialUpdates) { |
2316 // When partial updates are not allowed, max updates should be 0. | 2316 // When partial updates are not allowed, max updates should be 0. |
2317 { | 2317 { |
2318 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); | 2318 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); |
2319 | 2319 |
2320 scoped_ptr<FakeProxy> proxy(new FakeProxy); | 2320 scoped_ptr<FakeProxy> proxy(new FakeProxy); |
2321 proxy->GetRendererCapabilities().allow_partial_texture_updates = false; | 2321 proxy->GetRendererCapabilities().allow_partial_texture_updates = false; |
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4676 } | 4676 } |
4677 | 4677 |
4678 int commit_count_; | 4678 int commit_count_; |
4679 int commit_complete_count_; | 4679 int commit_complete_count_; |
4680 TestSwapPromiseResult swap_promise_result_[3]; | 4680 TestSwapPromiseResult swap_promise_result_[3]; |
4681 }; | 4681 }; |
4682 | 4682 |
4683 MULTI_THREAD_TEST_F(LayerTreeHostTestBreakSwapPromise); | 4683 MULTI_THREAD_TEST_F(LayerTreeHostTestBreakSwapPromise); |
4684 | 4684 |
4685 } // namespace cc | 4685 } // namespace cc |
OLD | NEW |