gecko-dev/layout/painting
Jamie Nicol 3b6922b0b9 Bug 1594446 - Clamp scale at 32k to avoid excessively large visible regions r=mattwoodrow
The size of the visible region, for either a painted layer or a webrender blob
image, is calculated from the building rects of the contained display items, in
local-space. This should be restricted to the display port, to prevent the
visible regions growing too large leading to excessive memory usage.

For items within large scale transforms, the local-space visible region should
be very small. However, as we do not allow fractional sizes, the size of the
visible region will be rounded up to at least 1. This means that when we convert
the region back to screen-space, we are multiplying the extremely large scale by
at least one, rather than by a much smaller fraction. This can result in
incredibly large visible regions, and was causing OOM crashes.

To avoid this, we clamp the maximum chosen scale for these layers/blob images to
32k. Layers affected by this problem should have a visible region with
dimensions of 1 or 2, so this limits the resulting screen-space size for
those to an acceptable value. Layers with visible regions sized greater than
that should not have scales anywhere near this large, so will not be affected.

Differential Revision: https://phabricator.services.mozilla.com/D55691

--HG--
extra : moz-landing-system : lando
2019-12-05 11:39:01 +00:00
..
crashtests Bug 1521640 - Update android crashtest assertion ranges; r=geckoview-reviewers,snorp 2019-10-15 19:40:24 +00:00
ActiveLayerTracker.cpp Bug 1594949 - Fix assertion of gfx::Path when changing offset-path on some svg frames. r=heycam 2019-11-11 23:31:23 +00:00
ActiveLayerTracker.h Bug 1429305 - Extend compositor properties for motion. r=hiro 2019-10-31 20:07:45 +00:00
BorderCache.h
BorderConsts.h
DashedCornerFinder.cpp
DashedCornerFinder.h
DisplayItemClip.cpp Bug 1554247 - Fix bracing in layout/painting r=miko 2019-05-29 14:34:34 +00:00
DisplayItemClip.h
DisplayItemClipChain.cpp
DisplayItemClipChain.h
DisplayListChecker.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
DisplayListChecker.h
DisplayListClipState.cpp
DisplayListClipState.h
DottedCornerFinder.cpp
DottedCornerFinder.h
FrameLayerBuilder.cpp Bug 1594446 - Clamp scale at 32k to avoid excessively large visible regions r=mattwoodrow 2019-12-05 11:39:01 +00:00
FrameLayerBuilder.h Bug 1348503 - Retrieve the FrameLayerBuilder pointer from the LayerManager when we need it. r=tnikkel 2019-06-13 17:02:54 +00:00
LayerState.h
MaskLayerImageCache.cpp
MaskLayerImageCache.h
MatrixStack.h
moz.build Bug 1411922: Part 1: Add rendering support for text-decoration-skip-ink r=jfkthame 2019-08-07 17:41:13 +00:00
nsCSSRendering.cpp Bug 1356712 - Remove bogus assertions. r=emilio 2019-11-12 19:09:13 +00:00
nsCSSRendering.h Bug 1573711 - Account for baseline offset (potential effect of vertical-align property) when computing skip-ink intercepts. r=dholbert 2019-08-31 04:32:55 +00:00
nsCSSRenderingBorders.cpp Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond 2019-11-16 20:59:34 +00:00
nsCSSRenderingBorders.h Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond 2019-11-16 20:59:34 +00:00
nsCSSRenderingGradients.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-07-06 08:18:28 +00:00
nsCSSRenderingGradients.h Bug 1557212 - Use cbindgen for gradients. r=jwatt 2019-06-07 14:13:17 +00:00
nsDisplayItemTypes.h
nsDisplayItemTypesList.h Bug 1592739 - Stop clearing the background behind vibrant -moz-appearance items. r=mattwoodrow 2019-11-05 18:48:29 +00:00
nsDisplayList.cpp Bug 1600372 - When hit-testing for visibility, do not return nodes in opacity: 0 subtrees. r=mattwoodrow,mconley 2019-12-03 19:49:52 +00:00
nsDisplayList.h Bug 1600372 - When hit-testing for visibility, do not return nodes in opacity: 0 subtrees. r=mattwoodrow,mconley 2019-12-03 19:49:52 +00:00
nsDisplayListArenaTypes.h Bug 1560188 - Fix and improve display list memory reporting. r=mattwoodrow,njn 2019-07-02 02:46:09 +00:00
nsDisplayListInvalidation.cpp
nsDisplayListInvalidation.h
nsImageRenderer.cpp Bug 1600362 - Cleanup IntersectionObserver. r=smaug 2019-11-29 20:39:36 +00:00
nsImageRenderer.h Bug 1409773 - Use WebRender instead of fallback for border raster images. r=jrmuizel 2019-07-08 12:54:44 -04:00
PaintTracker.cpp
PaintTracker.h
RetainedDisplayListBuilder.cpp Bug 1567889 - Part 3: Cleanup will change budgeting r=mattwoodrow 2019-10-28 14:11:45 +00:00
RetainedDisplayListBuilder.h Bug 1558482 - Apply visibleRect and scaling when painting. r=mattwoodrow 2019-06-11 07:52:12 -05:00
RetainedDisplayListHelpers.h Bug 1554247 - Fix bracing in layout/painting r=miko 2019-05-29 14:34:34 +00:00
TransformClipNode.h