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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2251583002: Round GPU tiles to multiple of 64 to work around CA scaling issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reland Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 43ea41176a73e8becafcb1d0d8c86c9180db9800..ba56562ecaafcd78320ab85e07f3dd1c06c8f6c1 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -767,6 +767,13 @@ gfx::Size PictureLayerImpl::CalculateTileSize(
default_tile_width += 2 * PictureLayerTiling::kBorderTexels;
default_tile_height += 2 * PictureLayerTiling::kBorderTexels;
+ // Round GPU default tile sizes to a multiple of kTileRoundUp. This
+ // helps prevent rounding errors in our CA path. crbug.com/632274
+ default_tile_width =
+ MathUtil::UncheckedRoundUp(default_tile_width, kTileRoundUp);
+ default_tile_height =
+ MathUtil::UncheckedRoundUp(default_tile_height, kTileRoundUp);
+
default_tile_height =
std::max(default_tile_height, kMinHeightForGpuRasteredTile);
} else {
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698