Tweak Plot size to try to get better perf.
Large plots allow tighter packing of large glyphs, but smaller plots take less time to update. Trying a size in between for the largest A8 size. Bug: skia:8642 Change-Id: Ib6d7651b70fe3a2101a3bfc5b367c433123cb914 Reviewed-on: https://skia-review.googlesource.com/c/179242 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
88f1fa54fd
commit
fdcbe206f5
@ -640,10 +640,9 @@ SkISize GrDrawOpAtlasConfig::plotDimensions(GrMaskFormat type) const {
|
||||
// larger SDF glyphs. Since the largest SDF glyph can be 170x170 with padding, this
|
||||
// allows us to pack 3 in a 512x256 plot, or 9 in a 512x512 plot.
|
||||
|
||||
// This will give us 512x256 plots for 2048x1024, 512x512 plots for 2048x2048,
|
||||
// and 256x256 plots otherwise.
|
||||
// This will give us 512x256 plots for 2048x1024 and 2048x2048, and 256x256 plots otherwise.
|
||||
int plotWidth = atlasDimensions.width() >= 2048 ? 512 : 256;
|
||||
int plotHeight = atlasDimensions.height() >= 2048 ? 512 : 256;
|
||||
int plotHeight = 256;
|
||||
|
||||
return { plotWidth, plotHeight };
|
||||
} else {
|
||||
|
@ -266,17 +266,17 @@ DEF_GPUTEST(GrDrawOpAtlasConfig_Basic, reporter, options) {
|
||||
test_atlas_config(reporter, 65536, 4 * 1024 * 1024, kARGB_GrMaskFormat,
|
||||
{ 1024, 1024 }, { 256, 256 });
|
||||
test_atlas_config(reporter, 65536, 4 * 1024 * 1024, kA8_GrMaskFormat,
|
||||
{ 2048, 2048 }, { 512, 512 });
|
||||
{ 2048, 2048 }, { 512, 256 });
|
||||
// 8 MB
|
||||
test_atlas_config(reporter, 65536, 8 * 1024 * 1024, kARGB_GrMaskFormat,
|
||||
{ 2048, 1024 }, { 256, 256 });
|
||||
test_atlas_config(reporter, 65536, 8 * 1024 * 1024, kA8_GrMaskFormat,
|
||||
{ 2048, 2048 }, { 512, 512 });
|
||||
{ 2048, 2048 }, { 512, 256 });
|
||||
// 16 MB (should be same as 8 MB)
|
||||
test_atlas_config(reporter, 65536, 16 * 1024 * 1024, kARGB_GrMaskFormat,
|
||||
{ 2048, 1024 }, { 256, 256 });
|
||||
test_atlas_config(reporter, 65536, 16 * 1024 * 1024, kA8_GrMaskFormat,
|
||||
{ 2048, 2048 }, { 512, 512 });
|
||||
{ 2048, 2048 }, { 512, 256 });
|
||||
|
||||
// 4MB, restricted texture size
|
||||
test_atlas_config(reporter, 1024, 8 * 1024 * 1024, kARGB_GrMaskFormat,
|
||||
|
Loading…
Reference in New Issue
Block a user