OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/nine_patch_layer.h" | 5 #include "cc/layers/nine_patch_layer.h" |
6 | 6 |
7 #include "cc/base/thread.h" | 7 #include "cc/base/thread.h" |
8 #include "cc/debug/overdraw_metrics.h" | 8 #include "cc/debug/overdraw_metrics.h" |
9 #include "cc/resources/prioritized_resource_manager.h" | 9 #include "cc/resources/prioritized_resource_manager.h" |
10 #include "cc/resources/resource_provider.h" | 10 #include "cc/resources/resource_provider.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 using ::testing::AtLeast; | 25 using ::testing::AtLeast; |
26 using ::testing::AnyNumber; | 26 using ::testing::AnyNumber; |
27 | 27 |
28 namespace cc { | 28 namespace cc { |
29 namespace { | 29 namespace { |
30 | 30 |
31 class MockLayerTreeHost : public LayerTreeHost { | 31 class MockLayerTreeHost : public LayerTreeHost { |
32 public: | 32 public: |
33 explicit MockLayerTreeHost(LayerTreeHostClient* client) | 33 explicit MockLayerTreeHost(LayerTreeHostClient* client) |
34 : LayerTreeHost(client, LayerTreeSettings()) { | 34 : LayerTreeHost(client, LayerTreeSettings()) { |
35 Initialize(scoped_ptr<Thread>(NULL)); | 35 Initialize(scoped_ptr<Thread>()); |
36 } | 36 } |
37 }; | 37 }; |
38 | 38 |
39 class NinePatchLayerTest : public testing::Test { | 39 class NinePatchLayerTest : public testing::Test { |
40 public: | 40 public: |
41 NinePatchLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} | 41 NinePatchLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} |
42 | 42 |
43 cc::Proxy* Proxy() const { return layer_tree_host_->proxy(); } | 43 cc::Proxy* Proxy() const { return layer_tree_host_->proxy(); } |
44 | 44 |
45 protected: | 45 protected: |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 EXPECT_EQ(1u, queue2.FullUploadSize()); | 133 EXPECT_EQ(1u, queue2.FullUploadSize()); |
134 EXPECT_EQ(0u, queue2.PartialUploadSize()); | 134 EXPECT_EQ(0u, queue2.PartialUploadSize()); |
135 params = queue2.TakeFirstFullUpload(); | 135 params = queue2.TakeFirstFullUpload(); |
136 EXPECT_TRUE(params.texture != NULL); | 136 EXPECT_TRUE(params.texture != NULL); |
137 EXPECT_EQ(params.texture->resource_manager(), | 137 EXPECT_EQ(params.texture->resource_manager(), |
138 layer_tree_host_->contents_texture_manager()); | 138 layer_tree_host_->contents_texture_manager()); |
139 } | 139 } |
140 | 140 |
141 } // namespace | 141 } // namespace |
142 } // namespace cc | 142 } // namespace cc |
OLD | NEW |