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 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1980 } | 1980 } |
1981 | 1981 |
1982 private: | 1982 private: |
1983 class FakeRasterBuffer : public RasterBuffer { | 1983 class FakeRasterBuffer : public RasterBuffer { |
1984 public: | 1984 public: |
1985 void Playback( | 1985 void Playback( |
1986 const RasterSource* raster_source, | 1986 const RasterSource* raster_source, |
1987 const gfx::Rect& raster_full_rect, | 1987 const gfx::Rect& raster_full_rect, |
1988 const gfx::Rect& raster_dirty_rect, | 1988 const gfx::Rect& raster_dirty_rect, |
1989 uint64_t new_content_id, | 1989 uint64_t new_content_id, |
1990 float scale, | 1990 const ScaleTranslate2d& transform, |
1991 const RasterSource::PlaybackSettings& playback_settings) override {} | 1991 const RasterSource::PlaybackSettings& playback_settings) override {} |
1992 }; | 1992 }; |
1993 }; | 1993 }; |
1994 | 1994 |
1995 class TileManagerReadyToDrawTest : public TileManagerTest { | 1995 class TileManagerReadyToDrawTest : public TileManagerTest { |
1996 public: | 1996 public: |
1997 ~TileManagerReadyToDrawTest() override { | 1997 ~TileManagerReadyToDrawTest() override { |
1998 // Ensure that the host impl doesn't outlive |raster_buffer_provider_|. | 1998 // Ensure that the host impl doesn't outlive |raster_buffer_provider_|. |
1999 TakeHostImpl(); | 1999 TakeHostImpl(); |
2000 } | 2000 } |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 // a part of raster tasks, the test should fail. | 2376 // a part of raster tasks, the test should fail. |
2377 host_impl()->tile_manager()->PrepareTiles(host_impl()->global_tile_state()); | 2377 host_impl()->tile_manager()->PrepareTiles(host_impl()->global_tile_state()); |
2378 EXPECT_TRUE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); | 2378 EXPECT_TRUE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); |
2379 static_cast<SynchronousTaskGraphRunner*>(task_graph_runner())->RunUntilIdle(); | 2379 static_cast<SynchronousTaskGraphRunner*>(task_graph_runner())->RunUntilIdle(); |
2380 base::RunLoop().RunUntilIdle(); | 2380 base::RunLoop().RunUntilIdle(); |
2381 EXPECT_FALSE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); | 2381 EXPECT_FALSE(host_impl()->tile_manager()->HasScheduledTileTasksForTesting()); |
2382 } | 2382 } |
2383 | 2383 |
2384 } // namespace | 2384 } // namespace |
2385 } // namespace cc | 2385 } // namespace cc |
OLD | NEW |