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 "base/time/time.h" | 5 #include "base/time/time.h" |
6 #include "cc/debug/lap_timer.h" | 6 #include "cc/debug/lap_timer.h" |
7 #include "cc/resources/raster_buffer.h" | 7 #include "cc/resources/raster_buffer.h" |
8 #include "cc/resources/tile.h" | 8 #include "cc/resources/tile.h" |
9 #include "cc/resources/tile_priority.h" | 9 #include "cc/resources/tile_priority.h" |
10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 void SetupPendingTree(scoped_refptr<PicturePileImpl> pile) { | 153 void SetupPendingTree(scoped_refptr<PicturePileImpl> pile) { |
154 host_impl_.CreatePendingTree(); | 154 host_impl_.CreatePendingTree(); |
155 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 155 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
156 // Clear recycled tree. | 156 // Clear recycled tree. |
157 pending_tree->DetachLayerTree(); | 157 pending_tree->DetachLayerTree(); |
158 | 158 |
159 scoped_ptr<FakePictureLayerImpl> pending_layer = | 159 scoped_ptr<FakePictureLayerImpl> pending_layer = |
160 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, pile); | 160 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, pile); |
161 pending_layer->SetDrawsContent(true); | 161 pending_layer->SetDrawsContent(true); |
| 162 pending_layer->SetHasRenderSurface(true); |
162 pending_tree->SetRootLayer(pending_layer.Pass()); | 163 pending_tree->SetRootLayer(pending_layer.Pass()); |
163 | 164 |
164 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( | 165 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( |
165 host_impl_.pending_tree()->LayerById(id_)); | 166 host_impl_.pending_tree()->LayerById(id_)); |
166 } | 167 } |
167 | 168 |
168 void RunRasterQueueConstructTest(const std::string& test_name, | 169 void RunRasterQueueConstructTest(const std::string& test_name, |
169 int layer_count) { | 170 int layer_count) { |
170 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, | 171 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, |
171 SMOOTHNESS_TAKES_PRIORITY, | 172 SMOOTHNESS_TAKES_PRIORITY, |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 467 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
467 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 468 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
468 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 469 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
469 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 470 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
470 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 471 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
471 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 472 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
472 } | 473 } |
473 | 474 |
474 } // namespace | 475 } // namespace |
475 } // namespace cc | 476 } // namespace cc |
OLD | NEW |