This patch allows animated SVG images to take advantage of blob
recordings like static SVG images. While before this patch, they would
use fallback blob recordings, this has the advantage of reusing the blob
key on an update. This helps avoid unnecessary scene rebuilds, as well
as reusing the same texture allocation for the rasterized blob.
Differential Revision: https://phabricator.services.mozilla.com/D111839
Bug 1712147 restricted JPEG-XL (controlled by preference image.jxl.enabled) to be only `true`
if MOZ_JXL is set and ifdef-ed the caller. This patch ifdef-s the function definition.
Differential Revision: https://phabricator.services.mozilla.com/D116100
This removes the check from static prefs, mainly since it's hard to check MOZ_JXL in JS side. It can be a bit confusing but generally shouldn't be harmful.
Differential Revision: https://phabricator.services.mozilla.com/D115704
An image container can keep a surface alive longer than it can remain in
the cache, if it is indeed kept in the cache. We should cross reference
our memory report generated from the SurfaceCache against any surfaces
stored in our ImageContainer objects to ensure they are all reported.
This is of particular importance for blob recordings which are not put
into SurfaceCache. While the recordings themselves have their own memory
reporting inside of WebRender, it would be good to know what recordings
we are keeping alive from the content side to help break it down.
Differential Revision: https://phabricator.services.mozilla.com/D115517
Fix for ConvertYCbCrToRGB32 to use full range convert functions for full range data.
Some changes of libyuv are backported from newer version, to get support of full range BT.709 and BT.2020 colorspace.
Differential Revision: https://phabricator.services.mozilla.com/D105937
This creates a new leaf nsDisplayWrapper item for consumers that just want an empty wrapper, with a Paint method that asserts. This lets us leaves Paint pure-virtual on nsDisplayWrapList, and lets the compiler force us to implement it for the other leaf types.
It also disables flattening of transform/opacity items. This is because they flatten the items even when used with FlattenedDisplayItemIterator, even though this doesn't add markers to replace them (only FLB does this). We could in theory fix this, but I don't think FLB performance matters much any more.
Differential Revision: https://phabricator.services.mozilla.com/D114676
This creates a new leaf nsDisplayWrapper item for consumers that just want an empty wrapper, with a Paint method that asserts. This lets us leaves Paint pure-virtual on nsDisplayWrapList, and lets the compiler force us to implement it for the other leaf types.
It also disables flattening of transform/opacity items. This is because they flatten the items even when used with FlattenedDisplayItemIterator, even though this doesn't add markers to replace them (only FLB does this). We could in theory fix this, but I don't think FLB performance matters much any more.
Differential Revision: https://phabricator.services.mozilla.com/D114676
We don't support storing blob recordings in the surface cache at this
time so we should never look at it. It is possible that one may request
a blob recording, and have a previous rasterization available in the
cache because it was used in canvas or as a repeating background image.
We want to explicitly avoid the cache in that case.
Differential Revision: https://phabricator.services.mozilla.com/D115136
We don't support storing blob recordings in the surface cache at this
time so we should never look at it. It is possible that one may request
a blob recording, and have a previous rasterization available in the
cache because it was used in canvas or as a repeating background image.
We want to explicitly avoid the cache in that case.
Differential Revision: https://phabricator.services.mozilla.com/D115136
We don't support storing blob recordings in the surface cache at this
time so we should never look at it. It is possible that one may request
a blob recording, and have a previous rasterization available in the
cache because it was used in canvas or as a repeating background image.
We want to explicitly avoid the cache in that case.
Differential Revision: https://phabricator.services.mozilla.com/D115136
This patch hooks up the ImageIntRegion to the blob recording and makes
any necessary adjusts to the display list creation to take advantage of
it.
Differential Revision: https://phabricator.services.mozilla.com/D114986
This patch has no functional change beyond changing prototypes and
adding storage for ImageIntRegion for each ImageContainer.
Differential Revision: https://phabricator.services.mozilla.com/D114984
We want to use ImageRegion as one of the selection criteria to find a
valid ImageContainer for VectorImage. To avoid slightly different
floating point values causing us to recreate the recording, let's just
store it as integers.
Differential Revision: https://phabricator.services.mozilla.com/D114983
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.
The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.
The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.
Differential Revision: https://phabricator.services.mozilla.com/D113265