OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui_resource_layer.h" | 5 #include "cc/layers/ui_resource_layer.h" |
6 | 6 |
7 #include "cc/resources/prioritized_resource_manager.h" | 7 #include "cc/resources/prioritized_resource_manager.h" |
8 #include "cc/resources/resource_provider.h" | 8 #include "cc/resources/resource_provider.h" |
9 #include "cc/resources/resource_update_queue.h" | 9 #include "cc/resources/resource_update_queue.h" |
10 #include "cc/resources/scoped_ui_resource.h" | 10 #include "cc/resources/scoped_ui_resource.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace { | 29 namespace { |
30 | 30 |
31 class UIResourceLayerTest : public testing::Test { | 31 class UIResourceLayerTest : public testing::Test { |
32 public: | 32 public: |
33 UIResourceLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} | 33 UIResourceLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} |
34 | 34 |
35 protected: | 35 protected: |
36 virtual void SetUp() { | 36 virtual void SetUp() { |
37 layer_tree_host_ = FakeLayerTreeHost::Create(&fake_client_); | 37 layer_tree_host_ = FakeLayerTreeHost::Create(&fake_client_); |
38 layer_tree_host_->InitializeSingleThreaded( | 38 layer_tree_host_->InitializeSingleThreaded( |
39 &fake_client_, base::MessageLoopProxy::current()); | 39 &fake_client_, |
| 40 base::MessageLoopProxy::current(), |
| 41 nullptr); |
40 } | 42 } |
41 | 43 |
42 virtual void TearDown() { | 44 virtual void TearDown() { |
43 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); | 45 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); |
44 } | 46 } |
45 | 47 |
46 FakeLayerTreeHostClient fake_client_; | 48 FakeLayerTreeHostClient fake_client_; |
47 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; | 49 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; |
48 }; | 50 }; |
49 | 51 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 scoped_ptr<ScopedUIResource> resource = ScopedUIResource::Create( | 99 scoped_ptr<ScopedUIResource> resource = ScopedUIResource::Create( |
98 layer_tree_host_.get(), UIResourceBitmap(gfx::Size(10, 10), is_opaque)); | 100 layer_tree_host_.get(), UIResourceBitmap(gfx::Size(10, 10), is_opaque)); |
99 test_layer->SetUIResourceId(resource->id()); | 101 test_layer->SetUIResourceId(resource->id()); |
100 test_layer->Update(&queue, &occlusion_tracker); | 102 test_layer->Update(&queue, &occlusion_tracker); |
101 | 103 |
102 EXPECT_TRUE(test_layer->DrawsContent()); | 104 EXPECT_TRUE(test_layer->DrawsContent()); |
103 } | 105 } |
104 | 106 |
105 } // namespace | 107 } // namespace |
106 } // namespace cc | 108 } // namespace cc |
OLD | NEW |