From 76ce8282e07d0fa492c529a002b2792be3cd0290 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 23 Mar 2020 16:30:32 +0000 Subject: [PATCH 1/7] Bug 1623647 - Allocate one screen's worth of picture cache tiles in each direction instead of three. r=gw Differential Revision: https://phabricator.services.mozilla.com/D67559 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/610fe9c88f2e04fc10ce3564b7794d862562fd05 --- webrender/src/picture.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index c13dd59910..0bb911d523 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -2617,7 +2617,7 @@ impl TileCacheInstance { // tiles if the user is scrolling up and down small amounts, at the cost of // a bit of extra texture memory. let desired_rect_in_pic_space = screen_rect_in_pic_space - .inflate(0.0, 3.0 * self.tile_size.height); + .inflate(0.0, 1.0 * self.tile_size.height); let needed_rect_in_pic_space = desired_rect_in_pic_space .intersection(&pic_rect) From a7ce7404304d77e93be22cb99189d8e1c53eeb64 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 23 Mar 2020 16:30:40 +0000 Subject: [PATCH 2/7] Bug 1623777 - Replace fancy right single quotation mark with less fancy one. r=gw,jrmuizel So that moz-phab stops throwing an encoding error. Differential Revision: https://phabricator.services.mozilla.com/D67560 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/034d885d32cb73ae1457a30a4f2c115881bdc493 --- webrender/src/picture.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 0bb911d523..c404ebf1fc 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -3937,7 +3937,7 @@ pub enum Picture3DContext { /// Additional data per child for the case of this a root of 3D hierarchy. root_data: Option>, /// The spatial node index of an "ancestor" element, i.e. one - /// that establishes the transformed element’s containing block. + /// that establishes the transformed element's containing block. /// /// See CSS spec draft for more details: /// https://drafts.csswg.org/css-transforms-2/#accumulated-3d-transformation-matrix-computation From b8a03906463ddc6a71d988677c9d4865283e1c05 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 23 Mar 2020 16:30:49 +0000 Subject: [PATCH 3/7] Bug 1616901 - Allocate 16 layers for rgba8 linear textures in the cache and allocate new arrays instead of growing it. r=gw Differential Revision: https://phabricator.services.mozilla.com/D67575 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/622591504941057199af911f1167fa75cd8d8830 --- webrender/src/texture_cache.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webrender/src/texture_cache.rs b/webrender/src/texture_cache.rs index d55287ceb7..418383d997 100644 --- a/webrender/src/texture_cache.rs +++ b/webrender/src/texture_cache.rs @@ -293,7 +293,7 @@ impl SharedTextures { array_color8_linear: TextureArray::new( color_formats.clone(), TextureFilter::Linear, - 4, + 16, ), // Used for image-rendering: crisp. This is mostly favicons, which // are small. Some other images use it too, but those tend to be @@ -736,7 +736,7 @@ impl TextureCache { // either. OpenGL on mac is not long for this earth, so this may be // good enough until we have WebRender on gfx-rs (on Metal). // - // On other platform, we also clamp the number of textures per layer + // On all platforms, we also clamp the number of textures per layer to 16 // to avoid the cost of resizing large texture arrays (at the expense // of batching efficiency). // @@ -751,7 +751,7 @@ impl TextureCache { // with the same bug but a lower max texture size, we might need // to rethink our strategy anyway, since a limit below 32MB might // start to introduce performance issues. - max_texture_layers = max_texture_layers.min(32); + max_texture_layers = max_texture_layers.min(16); let mut pending_updates = TextureUpdateList::new(); From 69ccc9b7ab33dc6d5e8ecdaf0c34a94cb5b62b04 Mon Sep 17 00:00:00 2001 From: Mihai Alexandru Michis Date: Mon, 23 Mar 2020 16:30:58 +0000 Subject: [PATCH 4/7] Backed out 3 changesets (bug 1623777, bug 1616901, bug 1623647) for causing reftest failures. CLOSED TREE Backed out changeset 622591504941 (bug 1616901) Backed out changeset 034d885d32cb (bug 1623777) Backed out changeset 610fe9c88f2e (bug 1623647) [ghsync] From https://hg.mozilla.org/mozilla-central/rev/5868a89964eebb17c2a19be85879bbfc91f01c74 --- webrender/src/picture.rs | 4 ++-- webrender/src/texture_cache.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index c404ebf1fc..c13dd59910 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -2617,7 +2617,7 @@ impl TileCacheInstance { // tiles if the user is scrolling up and down small amounts, at the cost of // a bit of extra texture memory. let desired_rect_in_pic_space = screen_rect_in_pic_space - .inflate(0.0, 1.0 * self.tile_size.height); + .inflate(0.0, 3.0 * self.tile_size.height); let needed_rect_in_pic_space = desired_rect_in_pic_space .intersection(&pic_rect) @@ -3937,7 +3937,7 @@ pub enum Picture3DContext { /// Additional data per child for the case of this a root of 3D hierarchy. root_data: Option>, /// The spatial node index of an "ancestor" element, i.e. one - /// that establishes the transformed element's containing block. + /// that establishes the transformed element’s containing block. /// /// See CSS spec draft for more details: /// https://drafts.csswg.org/css-transforms-2/#accumulated-3d-transformation-matrix-computation diff --git a/webrender/src/texture_cache.rs b/webrender/src/texture_cache.rs index 418383d997..d55287ceb7 100644 --- a/webrender/src/texture_cache.rs +++ b/webrender/src/texture_cache.rs @@ -293,7 +293,7 @@ impl SharedTextures { array_color8_linear: TextureArray::new( color_formats.clone(), TextureFilter::Linear, - 16, + 4, ), // Used for image-rendering: crisp. This is mostly favicons, which // are small. Some other images use it too, but those tend to be @@ -736,7 +736,7 @@ impl TextureCache { // either. OpenGL on mac is not long for this earth, so this may be // good enough until we have WebRender on gfx-rs (on Metal). // - // On all platforms, we also clamp the number of textures per layer to 16 + // On other platform, we also clamp the number of textures per layer // to avoid the cost of resizing large texture arrays (at the expense // of batching efficiency). // @@ -751,7 +751,7 @@ impl TextureCache { // with the same bug but a lower max texture size, we might need // to rethink our strategy anyway, since a limit below 32MB might // start to introduce performance issues. - max_texture_layers = max_texture_layers.min(16); + max_texture_layers = max_texture_layers.min(32); let mut pending_updates = TextureUpdateList::new(); From 803bdf53059e15b0311a9d403220705524e09c3c Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 23 Mar 2020 21:49:30 +0000 Subject: [PATCH 5/7] Bug 1623647 - Allocate one screen's worth of picture cache tiles in each direction instead of three. r=gw Differential Revision: https://phabricator.services.mozilla.com/D67559 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/7f88fbe20e03f0e48c27c19a646279851ca420c7 --- webrender/src/picture.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index c13dd59910..0bb911d523 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -2617,7 +2617,7 @@ impl TileCacheInstance { // tiles if the user is scrolling up and down small amounts, at the cost of // a bit of extra texture memory. let desired_rect_in_pic_space = screen_rect_in_pic_space - .inflate(0.0, 3.0 * self.tile_size.height); + .inflate(0.0, 1.0 * self.tile_size.height); let needed_rect_in_pic_space = desired_rect_in_pic_space .intersection(&pic_rect) From 3607639c804e320941d1e72420f877e25572c877 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 23 Mar 2020 21:49:39 +0000 Subject: [PATCH 6/7] Bug 1623777 - Replace fancy right single quotation mark with less fancy one. r=gw,jrmuizel So that moz-phab stops throwing an encoding error. Differential Revision: https://phabricator.services.mozilla.com/D67560 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/09379d084a652de29caf95c65832abae0806c3fc --- webrender/src/picture.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 0bb911d523..c404ebf1fc 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -3937,7 +3937,7 @@ pub enum Picture3DContext { /// Additional data per child for the case of this a root of 3D hierarchy. root_data: Option>, /// The spatial node index of an "ancestor" element, i.e. one - /// that establishes the transformed element’s containing block. + /// that establishes the transformed element's containing block. /// /// See CSS spec draft for more details: /// https://drafts.csswg.org/css-transforms-2/#accumulated-3d-transformation-matrix-computation From 2f9154a452ad3d85bce2f9d7a2db2b63a862ade3 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 23 Mar 2020 21:49:47 +0000 Subject: [PATCH 7/7] Bug 1616901 - Allocate 16 layers for rgba8 linear textures in the cache and allocate new arrays instead of growing it. r=gw Differential Revision: https://phabricator.services.mozilla.com/D67575 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/6e0471fb173195a46fde74b877c1abaf02540867 --- webrender/src/texture_cache.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webrender/src/texture_cache.rs b/webrender/src/texture_cache.rs index d55287ceb7..418383d997 100644 --- a/webrender/src/texture_cache.rs +++ b/webrender/src/texture_cache.rs @@ -293,7 +293,7 @@ impl SharedTextures { array_color8_linear: TextureArray::new( color_formats.clone(), TextureFilter::Linear, - 4, + 16, ), // Used for image-rendering: crisp. This is mostly favicons, which // are small. Some other images use it too, but those tend to be @@ -736,7 +736,7 @@ impl TextureCache { // either. OpenGL on mac is not long for this earth, so this may be // good enough until we have WebRender on gfx-rs (on Metal). // - // On other platform, we also clamp the number of textures per layer + // On all platforms, we also clamp the number of textures per layer to 16 // to avoid the cost of resizing large texture arrays (at the expense // of batching efficiency). // @@ -751,7 +751,7 @@ impl TextureCache { // with the same bug but a lower max texture size, we might need // to rethink our strategy anyway, since a limit below 32MB might // start to introduce performance issues. - max_texture_layers = max_texture_layers.min(32); + max_texture_layers = max_texture_layers.min(16); let mut pending_updates = TextureUpdateList::new();