| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2345 TEST_F(CheckerImagingTileManagerTest, | 2345 TEST_F(CheckerImagingTileManagerTest, |
| 2346 NoImageDecodeDependencyForCheckeredTiles) { | 2346 NoImageDecodeDependencyForCheckeredTiles) { |
| 2347 const gfx::Size layer_bounds(512, 512); | 2347 const gfx::Size layer_bounds(512, 512); |
| 2348 SetupDefaultTrees(layer_bounds); | 2348 SetupDefaultTrees(layer_bounds); |
| 2349 | 2349 |
| 2350 std::unique_ptr<FakeRecordingSource> recording_source = | 2350 std::unique_ptr<FakeRecordingSource> recording_source = |
| 2351 FakeRecordingSource::CreateFilledRecordingSource(layer_bounds); | 2351 FakeRecordingSource::CreateFilledRecordingSource(layer_bounds); |
| 2352 recording_source->SetGenerateDiscardableImagesMetadata(true); | 2352 recording_source->SetGenerateDiscardableImagesMetadata(true); |
| 2353 | 2353 |
| 2354 sk_sp<SkImage> image = SkImage::MakeFromGenerator( | 2354 sk_sp<SkImage> image = SkImage::MakeFromGenerator( |
| 2355 new testing::StrictMock<MockImageGenerator>(gfx::Size(512, 512))); | 2355 base::MakeUnique<testing::StrictMock<MockImageGenerator>>( |
| 2356 gfx::Size(512, 512))); |
| 2356 recording_source->add_draw_image(image, gfx::Point(0, 0)); | 2357 recording_source->add_draw_image(image, gfx::Point(0, 0)); |
| 2357 | 2358 |
| 2358 recording_source->Rerecord(); | 2359 recording_source->Rerecord(); |
| 2359 scoped_refptr<RasterSource> raster_source = | 2360 scoped_refptr<RasterSource> raster_source = |
| 2360 RasterSource::CreateFromRecordingSource(recording_source.get(), false); | 2361 RasterSource::CreateFromRecordingSource(recording_source.get(), false); |
| 2361 | 2362 |
| 2362 std::unique_ptr<PictureLayerImpl> layer_impl = PictureLayerImpl::Create( | 2363 std::unique_ptr<PictureLayerImpl> layer_impl = PictureLayerImpl::Create( |
| 2363 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); | 2364 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); |
| 2364 layer_impl->set_is_drawn_render_surface_layer_list_member(true); | 2365 layer_impl->set_is_drawn_render_surface_layer_list_member(true); |
| 2365 PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set(); | 2366 PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2378 // a part of raster tasks, the test should fail. | 2379 // a part of raster tasks, the test should fail. |
| 2379 host_impl()->tile_manager()->PrepareTiles(host_impl()->global_tile_state()); | 2380 host_impl()->tile_manager()->PrepareTiles(host_impl()->global_tile_state()); |
| 2380 EXPECT_TRUE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); | 2381 EXPECT_TRUE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); |
| 2381 static_cast<SynchronousTaskGraphRunner*>(task_graph_runner())->RunUntilIdle(); | 2382 static_cast<SynchronousTaskGraphRunner*>(task_graph_runner())->RunUntilIdle(); |
| 2382 base::RunLoop().RunUntilIdle(); | 2383 base::RunLoop().RunUntilIdle(); |
| 2383 EXPECT_FALSE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); | 2384 EXPECT_FALSE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); |
| 2384 } | 2385 } |
| 2385 | 2386 |
| 2386 } // namespace | 2387 } // namespace |
| 2387 } // namespace cc | 2388 } // namespace cc |
| OLD | NEW |