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

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

Issue 2266223002: cc: Compute draw transforms dynamically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase! Created 4 years, 2 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/layer_tree_host_common.h » ('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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 gfx::Rect viewport(50, 50, 500, 500); 1083 gfx::Rect viewport(50, 50, 500, 500);
1084 gfx::Size layer_bounds(1600, 1600); 1084 gfx::Size layer_bounds(1600, 1600);
1085 1085
1086 const int soon_border_outset = 312; 1086 const int soon_border_outset = 312;
1087 gfx::Rect soon_rect = viewport; 1087 gfx::Rect soon_rect = viewport;
1088 soon_rect.Inset(-soon_border_outset, -soon_border_outset); 1088 soon_rect.Inset(-soon_border_outset, -soon_border_outset);
1089 1089
1090 client.SetTileSize(gfx::Size(30, 30)); 1090 client.SetTileSize(gfx::Size(30, 30));
1091 LayerTreeSettings settings; 1091 LayerTreeSettings settings;
1092 settings.verify_clip_tree_calculations = true; 1092 settings.verify_clip_tree_calculations = true;
1093 settings.verify_transform_tree_calculations = true;
1094 1093
1095 std::unique_ptr<PictureLayerTilingSet> tiling_set = 1094 std::unique_ptr<PictureLayerTilingSet> tiling_set =
1096 PictureLayerTilingSet::Create( 1095 PictureLayerTilingSet::Create(
1097 ACTIVE_TREE, &client, settings.tiling_interest_area_padding, 1096 ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
1098 settings.skewport_target_time_in_seconds, 1097 settings.skewport_target_time_in_seconds,
1099 settings.skewport_extrapolation_limit_in_screen_pixels, 1098 settings.skewport_extrapolation_limit_in_screen_pixels,
1100 settings.max_preraster_distance_in_screen_pixels); 1099 settings.max_preraster_distance_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);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 settings.max_preraster_distance_in_screen_pixels); 1211 settings.max_preraster_distance_in_screen_pixels);
1214 1212
1215 scoped_refptr<FakeRasterSource> raster_source = 1213 scoped_refptr<FakeRasterSource> raster_source =
1216 FakeRasterSource::CreateFilled(layer_bounds); 1214 FakeRasterSource::CreateFilled(layer_bounds);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 } 1889 }
1892 1890
1893 // Ensures that the tile manager does not attempt to reuse tiles when partial 1891 // Ensures that the tile manager does not attempt to reuse tiles when partial
1894 // raster is disabled. 1892 // raster is disabled.
1895 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { 1893 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) {
1896 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */); 1894 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */);
1897 } 1895 }
1898 1896
1899 } // namespace 1897 } // namespace
1900 } // namespace cc 1898 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_layer_tree_host_base.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698