Skip to content

Commit d5ace07

Browse files
nicalgithub-sync
authored andcommitted
Bug 1621212 - Don't default to square texture cache pages when the smallest extent is 32 pixels or less. r=gw
The code that picks the texture cache slab size does not consider snapped extents under 64 pixels for rectangular pages, causing for example a 16x500 request to go into a 512x512 page. This commit allows very thin requests to get a 64x512 page. Differential Revision: https://phabricator.services.mozilla.com/D66187 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/03f0fbdc04416190d45e13e9aa67d9895db8240e
1 parent daabdde commit d5ace07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webrender/src/texture_cache.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,12 +1483,12 @@ impl SlabSize {
14831483

14841484
let (width, height) = match (x_size, y_size) {
14851485
// Special cased rectangular slab pages.
1486-
(512, 256) => (512, 256),
1486+
(512, 0..=64) => (512, 64),
14871487
(512, 128) => (512, 128),
1488-
(512, 64) => (512, 64),
1489-
(256, 512) => (256, 512),
1488+
(512, 256) => (512, 256),
1489+
(0..=64, 512) => (64, 512),
14901490
(128, 512) => (128, 512),
1491-
( 64, 512) => ( 64, 512),
1491+
(256, 512) => (256, 512),
14921492

14931493
// If none of those fit, use a square slab size.
14941494
(x_size, y_size) => {

0 commit comments

Comments
 (0)