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/nine_patch_layer.h" | 5 #include "cc/nine_patch_layer.h" |
6 | 6 |
7 #include "cc/layer_tree_host.h" | 7 #include "cc/layer_tree_host.h" |
8 #include "cc/occlusion_tracker.h" | 8 #include "cc/occlusion_tracker.h" |
9 #include "cc/overdraw_metrics.h" | 9 #include "cc/overdraw_metrics.h" |
| 10 #include "cc/prioritized_resource_manager.h" |
10 #include "cc/rendering_stats.h" | 11 #include "cc/rendering_stats.h" |
11 #include "cc/resource_provider.h" | 12 #include "cc/resource_provider.h" |
| 13 #include "cc/resource_update_queue.h" |
12 #include "cc/single_thread_proxy.h" | 14 #include "cc/single_thread_proxy.h" |
13 #include "cc/resource_update_queue.h" | |
14 #include "cc/texture_uploader.h" | |
15 #include "cc/test/fake_layer_tree_host_client.h" | 15 #include "cc/test/fake_layer_tree_host_client.h" |
16 #include "cc/test/fake_output_surface.h" | 16 #include "cc/test/fake_output_surface.h" |
17 #include "cc/test/geometry_test_utils.h" | 17 #include "cc/test/geometry_test_utils.h" |
18 #include "cc/test/layer_tree_test_common.h" | 18 #include "cc/test/layer_tree_test_common.h" |
19 #include "SkBitmap.h" | 19 #include "cc/texture_uploader.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "third_party/skia/include/core/SkBitmap.h" |
22 | 23 |
23 using ::testing::Mock; | 24 using ::testing::Mock; |
24 using ::testing::_; | 25 using ::testing::_; |
25 using ::testing::AtLeast; | 26 using ::testing::AtLeast; |
26 using ::testing::AnyNumber; | 27 using ::testing::AnyNumber; |
27 | 28 |
28 namespace cc { | 29 namespace cc { |
29 namespace { | 30 namespace { |
30 | 31 |
31 class MockLayerTreeHost : public LayerTreeHost { | 32 class MockLayerTreeHost : public LayerTreeHost { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 testLayer->update(queue2, &occlusionTracker, stats); | 141 testLayer->update(queue2, &occlusionTracker, stats); |
141 EXPECT_EQ(queue2.fullUploadSize(), 1); | 142 EXPECT_EQ(queue2.fullUploadSize(), 1); |
142 EXPECT_EQ(queue2.partialUploadSize(), 0); | 143 EXPECT_EQ(queue2.partialUploadSize(), 0); |
143 params = queue2.takeFirstFullUpload(); | 144 params = queue2.takeFirstFullUpload(); |
144 EXPECT_TRUE(params.texture != NULL); | 145 EXPECT_TRUE(params.texture != NULL); |
145 EXPECT_EQ(params.texture->resourceManager(), m_layerTreeHost->contentsTextur
eManager()); | 146 EXPECT_EQ(params.texture->resourceManager(), m_layerTreeHost->contentsTextur
eManager()); |
146 } | 147 } |
147 | 148 |
148 } // namespace | 149 } // namespace |
149 } // namespace cc | 150 } // namespace cc |
OLD | NEW |