Commit 516d3a4f authored by Emircan Uysaler's avatar Emircan Uysaler Committed by Commit Bot

Reduce min_height_for_gpu_raster_tile for low memory devices

Bug: 1025408
Change-Id: I2cc6418f4dbbaf7b91f35fdc11ee8d5093d19fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922470Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarJonathan Ross <jonross@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Commit-Queue: Emircan Uysaler <emircan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717815}
parent f08c6f21
...@@ -3033,14 +3033,6 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( ...@@ -3033,14 +3033,6 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
settings.default_tile_size.set_height(tile_height); settings.default_tile_size.set_height(tile_height);
} }
if (cmd.HasSwitch(switches::kMinHeightForGpuRasterTile)) {
int min_height_for_gpu_raster_tile = 0;
switch_value_as_int(cmd, switches::kMinHeightForGpuRasterTile, 1,
std::numeric_limits<int>::max(),
&min_height_for_gpu_raster_tile);
settings.min_height_for_gpu_raster_tile = min_height_for_gpu_raster_tile;
}
int max_untiled_layer_width = settings.max_untiled_layer_size.width(); int max_untiled_layer_width = settings.max_untiled_layer_size.width();
if (cmd.HasSwitch(switches::kMaxUntiledLayerWidth)) { if (cmd.HasSwitch(switches::kMaxUntiledLayerWidth)) {
switch_value_as_int(cmd, switches::kMaxUntiledLayerWidth, 1, switch_value_as_int(cmd, switches::kMaxUntiledLayerWidth, 1,
...@@ -3246,6 +3238,19 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( ...@@ -3246,6 +3238,19 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
settings.unpremultiply_and_dither_low_bit_depth_tiles = true; settings.unpremultiply_and_dither_low_bit_depth_tiles = true;
} }
} }
// Setting a lower |min_height_for_gpu_raster_tile| makes sure that we do
// not allocate extra memory for tiles on the edge of a layer and reduces
// memory requirements.
settings.min_height_for_gpu_raster_tile = 128;
}
if (cmd.HasSwitch(switches::kMinHeightForGpuRasterTile)) {
int min_height_for_gpu_raster_tile = 0;
switch_value_as_int(cmd, switches::kMinHeightForGpuRasterTile, 1,
std::numeric_limits<int>::max(),
&min_height_for_gpu_raster_tile);
settings.min_height_for_gpu_raster_tile = min_height_for_gpu_raster_tile;
} }
if (cmd.HasSwitch(switches::kEnableLowResTiling)) if (cmd.HasSwitch(switches::kEnableLowResTiling))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment