Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: cc/tiles/tile_manager_unittest.cc

Issue 2639723002: [NOT FOR REVIEW]
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/test_layer_tree_host_base.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 1080
1081 gfx::Rect viewport(50, 50, 500, 500); 1081 gfx::Rect viewport(50, 50, 500, 500);
1082 gfx::Size layer_bounds(1600, 1600); 1082 gfx::Size layer_bounds(1600, 1600);
1083 1083
1084 const int soon_border_outset = 312; 1084 const int soon_border_outset = 312;
1085 gfx::Rect soon_rect = viewport; 1085 gfx::Rect soon_rect = viewport;
1086 soon_rect.Inset(-soon_border_outset, -soon_border_outset); 1086 soon_rect.Inset(-soon_border_outset, -soon_border_outset);
1087 1087
1088 client.SetTileSize(gfx::Size(30, 30)); 1088 client.SetTileSize(gfx::Size(30, 30));
1089 LayerTreeSettings settings; 1089 LayerTreeSettings settings;
1090 settings.verify_clip_tree_calculations = true;
1091 1090
1092 std::unique_ptr<PictureLayerTilingSet> tiling_set = 1091 std::unique_ptr<PictureLayerTilingSet> tiling_set =
1093 PictureLayerTilingSet::Create( 1092 PictureLayerTilingSet::Create(
1094 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, 1093 ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
1095 settings.skewport_target_time_in_seconds, 1094 settings.skewport_target_time_in_seconds,
1096 settings.skewport_extrapolation_limit_in_screen_pixels, 1095 settings.skewport_extrapolation_limit_in_screen_pixels,
1097 settings.max_preraster_distance_in_screen_pixels); 1096 settings.max_preraster_distance_in_screen_pixels);
1098 1097
1099 scoped_refptr<FakeRasterSource> raster_source = 1098 scoped_refptr<FakeRasterSource> raster_source =
1100 FakeRasterSource::CreateFilled(layer_bounds); 1099 FakeRasterSource::CreateFilled(layer_bounds);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 TEST_F(TileManagerTilePriorityQueueTest, 1191 TEST_F(TileManagerTilePriorityQueueTest,
1193 RasterTilePriorityQueueMovingViewport) { 1192 RasterTilePriorityQueueMovingViewport) {
1194 FakePictureLayerTilingClient client; 1193 FakePictureLayerTilingClient client;
1195 1194
1196 gfx::Rect viewport(50, 0, 100, 100); 1195 gfx::Rect viewport(50, 0, 100, 100);
1197 gfx::Rect moved_viewport(50, 0, 100, 500); 1196 gfx::Rect moved_viewport(50, 0, 100, 500);
1198 gfx::Size layer_bounds(1000, 1000); 1197 gfx::Size layer_bounds(1000, 1000);
1199 1198
1200 client.SetTileSize(gfx::Size(30, 30)); 1199 client.SetTileSize(gfx::Size(30, 30));
1201 LayerTreeSettings settings; 1200 LayerTreeSettings settings;
1202 settings.verify_clip_tree_calculations = true;
1203 1201
1204 std::unique_ptr<PictureLayerTilingSet> tiling_set = 1202 std::unique_ptr<PictureLayerTilingSet> tiling_set =
1205 PictureLayerTilingSet::Create( 1203 PictureLayerTilingSet::Create(
1206 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, 1204 ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
1207 settings.skewport_target_time_in_seconds, 1205 settings.skewport_target_time_in_seconds,
1208 settings.skewport_extrapolation_limit_in_screen_pixels, 1206 settings.skewport_extrapolation_limit_in_screen_pixels,
1209 settings.max_preraster_distance_in_screen_pixels); 1207 settings.max_preraster_distance_in_screen_pixels);
1210 1208
1211 scoped_refptr<FakeRasterSource> raster_source = 1209 scoped_refptr<FakeRasterSource> raster_source =
1212 FakeRasterSource::CreateFilled(layer_bounds); 1210 FakeRasterSource::CreateFilled(layer_bounds);
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 } 1920 }
1923 1921
1924 // Ensures that the tile manager does not attempt to reuse tiles when partial 1922 // Ensures that the tile manager does not attempt to reuse tiles when partial
1925 // raster is disabled. 1923 // raster is disabled.
1926 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { 1924 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) {
1927 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */); 1925 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */);
1928 } 1926 }
1929 1927
1930 } // namespace 1928 } // namespace
1931 } // namespace cc 1929 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_layer_tree_host_base.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698