| 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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 gfx::Rect viewport(50, 50, 500, 500); | 1084 gfx::Rect viewport(50, 50, 500, 500); |
| 1085 gfx::Size layer_bounds(1600, 1600); | 1085 gfx::Size layer_bounds(1600, 1600); |
| 1086 | 1086 |
| 1087 const int soon_border_outset = 312; | 1087 const int soon_border_outset = 312; |
| 1088 gfx::Rect soon_rect = viewport; | 1088 gfx::Rect soon_rect = viewport; |
| 1089 soon_rect.Inset(-soon_border_outset, -soon_border_outset); | 1089 soon_rect.Inset(-soon_border_outset, -soon_border_outset); |
| 1090 | 1090 |
| 1091 client.SetTileSize(gfx::Size(30, 30)); | 1091 client.SetTileSize(gfx::Size(30, 30)); |
| 1092 LayerTreeSettings settings; | 1092 LayerTreeSettings settings; |
| 1093 settings.verify_clip_tree_calculations = true; | 1093 settings.verify_clip_tree_calculations = true; |
| 1094 settings.verify_transform_tree_calculations = true; | |
| 1095 | 1094 |
| 1096 std::unique_ptr<PictureLayerTilingSet> tiling_set = | 1095 std::unique_ptr<PictureLayerTilingSet> tiling_set = |
| 1097 PictureLayerTilingSet::Create( | 1096 PictureLayerTilingSet::Create( |
| 1098 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, | 1097 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, |
| 1099 settings.skewport_target_time_in_seconds, | 1098 settings.skewport_target_time_in_seconds, |
| 1100 settings.skewport_extrapolation_limit_in_screen_pixels); | 1099 settings.skewport_extrapolation_limit_in_screen_pixels); |
| 1101 | 1100 |
| 1102 scoped_refptr<FakeRasterSource> raster_source = | 1101 scoped_refptr<FakeRasterSource> raster_source = |
| 1103 FakeRasterSource::CreateFilled(layer_bounds); | 1102 FakeRasterSource::CreateFilled(layer_bounds); |
| 1104 PictureLayerTiling* tiling = tiling_set->AddTiling(1.0f, raster_source); | 1103 PictureLayerTiling* tiling = tiling_set->AddTiling(1.0f, raster_source); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 RasterTilePriorityQueueMovingViewport) { | 1195 RasterTilePriorityQueueMovingViewport) { |
| 1197 FakePictureLayerTilingClient client; | 1196 FakePictureLayerTilingClient client; |
| 1198 | 1197 |
| 1199 gfx::Rect viewport(50, 0, 100, 100); | 1198 gfx::Rect viewport(50, 0, 100, 100); |
| 1200 gfx::Rect moved_viewport(50, 0, 100, 500); | 1199 gfx::Rect moved_viewport(50, 0, 100, 500); |
| 1201 gfx::Size layer_bounds(1000, 1000); | 1200 gfx::Size layer_bounds(1000, 1000); |
| 1202 | 1201 |
| 1203 client.SetTileSize(gfx::Size(30, 30)); | 1202 client.SetTileSize(gfx::Size(30, 30)); |
| 1204 LayerTreeSettings settings; | 1203 LayerTreeSettings settings; |
| 1205 settings.verify_clip_tree_calculations = true; | 1204 settings.verify_clip_tree_calculations = true; |
| 1206 settings.verify_transform_tree_calculations = true; | |
| 1207 | 1205 |
| 1208 std::unique_ptr<PictureLayerTilingSet> tiling_set = | 1206 std::unique_ptr<PictureLayerTilingSet> tiling_set = |
| 1209 PictureLayerTilingSet::Create( | 1207 PictureLayerTilingSet::Create( |
| 1210 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, | 1208 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, |
| 1211 settings.skewport_target_time_in_seconds, | 1209 settings.skewport_target_time_in_seconds, |
| 1212 settings.skewport_extrapolation_limit_in_screen_pixels); | 1210 settings.skewport_extrapolation_limit_in_screen_pixels); |
| 1213 | 1211 |
| 1214 scoped_refptr<FakeRasterSource> raster_source = | 1212 scoped_refptr<FakeRasterSource> raster_source = |
| 1215 FakeRasterSource::CreateFilled(layer_bounds); | 1213 FakeRasterSource::CreateFilled(layer_bounds); |
| 1216 PictureLayerTiling* tiling = tiling_set->AddTiling(1.0f, raster_source); | 1214 PictureLayerTiling* tiling = tiling_set->AddTiling(1.0f, raster_source); |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 } | 1888 } |
| 1891 | 1889 |
| 1892 // Ensures that the tile manager does not attempt to reuse tiles when partial | 1890 // Ensures that the tile manager does not attempt to reuse tiles when partial |
| 1893 // raster is disabled. | 1891 // raster is disabled. |
| 1894 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { | 1892 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { |
| 1895 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */); | 1893 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */); |
| 1896 } | 1894 } |
| 1897 | 1895 |
| 1898 } // namespace | 1896 } // namespace |
| 1899 } // namespace cc | 1897 } // namespace cc |
| OLD | NEW |