4218 Commits

Author SHA1 Message Date
Timothy Nikkel
6846d0c094 Bug 1755032. Fix data race on imgRequest::mInnerWindowId. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D138623
2022-02-14 10:00:40 +00:00
Sean Feng
8e783e6bee Bug 1753471 - Only notify http-on-image-cache-response once per cache entry r=tnikkel
I've also tested the behavior in Chrome and I think this is
the correct way of doing it. Chrome also only notifies the
cached entry once, it won't notify it even if I manually
trigger it after pageload.

Differential Revision: https://phabricator.services.mozilla.com/D138346
2022-02-10 18:18:28 +00:00
Emilio Cobos Álvarez
3e6347714a Bug 1753453 - Don't send OnUnlockedDraw for non-animated images. r=aosmond
We're checking animation consumers, not locked status. We don't care
about animation consumer count of non-animated images.

Depends on D137765

Differential Revision: https://phabricator.services.mozilla.com/D137766
2022-02-03 17:31:42 +00:00
Nicklas Boman
368311a741 Bug 1725363 - Replace PL_strcasecmp with nsCRT::strcasecmp image/ r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D129074
2022-01-26 09:07:33 +00:00
Randell Jesup
a0d48b8198 Bug 1749062: imgFrame cleanup r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D135418
2022-01-25 18:33:35 +00:00
Timothy Nikkel
8dd4b286bd Bug 1712836. Decrease number of iframes containing animated gifs so slower platforms have a chance to end test with no paints pending. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D136310
2022-01-19 21:11:12 +00:00
Luca Greco
24af3febf1 Bug 1746841 - Revert Bug 1747091 temporary workaround to prevent moz-extension css from being cached. r=emilio
Depends on D134508

Differential Revision: https://phabricator.services.mozilla.com/D135739
2022-01-19 19:58:13 +00:00
Timothy Nikkel
32bad1b68a Bug 1750475. Allow quality parameter to be passed through the webp encoder from canvas data url encoding functions. r=lsalzman
The necessary code was already there, just needed to allow it through.

Differential Revision: https://phabricator.services.mozilla.com/D136092
2022-01-19 09:50:33 +00:00
Mike Hommey
fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns
e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey
b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
Emilio Cobos Álvarez
ec7f948696 Bug 1747091 - Force CSS with moz-extension schemes to get revalidated temporarily. r=rpl
See bug 1746841 comment 11 for the right fix instead.

Differential Revision: https://phabricator.services.mozilla.com/D134424
2021-12-22 11:46:59 +00:00
Jon Bauman
ffc22b2f8a Bug 1745608 - Add additional AVIF telemetry for unimplemented features. r=aosmond CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D133580
2021-12-18 20:05:19 +00:00
Randell Jesup
7840dcdbd7 Bug 1746313: Image cleanup r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133982
2021-12-16 14:15:32 +00:00
Andrew Osmond
928d48a2ae Bug 1742051 - Allow factor-of-2 scaling for vector images without intrinsic size. r=tnikkel
If a vector image does not have an intrinsic size as returned by
VectorImage::GetWidth and VectorImage::GetHeight, currently factor-of-2
scaling is disabled. With this patch, we just assume a default size of
100x100, adjusted by the intrinsic ratio if available, to get the
baseline size for determing appropriate factor-of-2 sizes.

Differential Revision: https://phabricator.services.mozilla.com/D133395
2021-12-10 14:54:02 +00:00
Christoph Kerschbaumer
42a0c93ddc Bug 1720280: Avoid NullPtr deref in ImageBlocker::ShouldLoad. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132923
2021-12-09 12:09:40 +00:00
Andrew Osmond
90fb928d6b Bug 1704876 - Fix a shutdown crash when we race to update an animated vector image. r=tnikkel
If we are shutting down, the document for a VectorImage may be cleared.
If a refresh tick raced with the shutdown, we might try to deref the
null document.

Differential Revision: https://phabricator.services.mozilla.com/D132953
2021-12-07 03:10:10 +00:00
Joel Maher
63bf096aef Bug 1743907 - Remove webrender annotation from manifestparser manifests. r=ahal,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D132682
2021-12-03 16:04:29 +00:00
Andrew Osmond
33641307ec Bug 1743761 - Ensure we invalidate substituted images when the preferred size is ready. r=tnikkel
Previously with ImageContainers, we would put the new preferred surface
into the ImageContainer. When we check if we should invalidate, it would
have a different image key, and hence invalidate the image frame and
schedule a paint.

With ImageProviders, it returns the same key in this case, because the
ImageProvider represents a particular surface. As such, we need to
actually track when we get a substituted ImageProvider, and invalidate
the image frame more aggressively to ensure we get the preferred size.

Differential Revision: https://phabricator.services.mozilla.com/D132583
2021-12-03 03:14:01 +00:00
Chris Peterson
f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Emilio Cobos Álvarez
323ecd6f31 Bug 1743377 - Remove imgLoader::PreferLoadFromCache. r=aosmond
Instead treat these protocols as "never-expiring" protocols, and clean
up revalidation code while at it.

Depends on D132347

Differential Revision: https://phabricator.services.mozilla.com/D132348
2021-11-29 15:18:14 +00:00
Emilio Cobos Álvarez
c5f2196f46 Bug 1743377 - Prefer using to typedef in imgLoader. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D132347
2021-11-29 15:18:13 +00:00
Andrew Osmond
72d1c14b24 Bug 1711061 - Part 13. Remove the now unused ImageContainer and related code for images. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126606
2021-11-27 11:47:40 +00:00
Andrew Osmond
e2f023d269 Bug 1711061 - Part 11. Implement VectorImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126604
2021-11-27 11:47:40 +00:00
Andrew Osmond
6c26762435 Bug 1711061 - Part 10. Implement BlobSurfaceProvider for non-rasterized blob recordings. r=tnikkel
This WebRenderImageProvider/ISurfaceProvider subclass provides the
implementation for blob recordings. This is mostly just taking the
functionality that was previously in SourceSurfaceBlobImage.

Differential Revision: https://phabricator.services.mozilla.com/D126602
2021-11-27 11:47:39 +00:00
Andrew Osmond
ba2c6dea3f Bug 1711061 - Part 9. Add blob recording support to SurfaceCache. r=tnikkel
Now that we no longer have the extra layer of ImageContainers providing
a superficial level of caching/reuse of existing blob recordings, we
need some way to share recordings. This part adds support to
SurfaceCache to store BlobSurfaceProvider objects.

This includes the specialized code for invalidating SVG images. In
particular this is useful for animated SVG images. In general we want to
avoid changing the image key whenever possible so that we avoid
reallocating the underlying buffers in the compositor process for the
rasterized blob images.

We also need to track the ImageIntRegion used by the recording. If a
caller only wants a slice of the SVG image, then we need to track this
differentiation in our cache entries. At this time, we don't allow
substitutes for entries with a region exclusion.

Differential Revision: https://phabricator.services.mozilla.com/D126603
2021-11-27 11:47:39 +00:00
Andrew Osmond
3a3c39b1b5 Bug 1711061 - Part 8. Rename SourceSurfaceBlobImage.h/cpp to BlobSurfaceProvider.h/cpp. r=tnikkel
Rename the file in preparation for the switch over to
WebRenderImageProvider.

Differential Revision: https://phabricator.services.mozilla.com/D126601
2021-11-27 11:47:38 +00:00
Andrew Osmond
f0d93233dc Bug 1711061 - Part 7. Remove support for ImageContainer-based SVG image blob recordings. r=tnikkel
This will be replaced by a WebRenderImageProvider-based implementation
in a later part in this series.

Differential Revision: https://phabricator.services.mozilla.com/D126600
2021-11-27 11:47:38 +00:00
Andrew Osmond
f34091ea25 Bug 1711061 - Part 6. Implement RasterImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126599
2021-11-27 11:47:38 +00:00
Andrew Osmond
1b58f91a50 Bug 1711061 - Part 5. Expose an ImageProviderId for tracking surface ownership. r=tnikkel
This will be used by layers as a replacement for ImageContainer's
ContainerProducerID for tracking if the same imgIRequest/imgIContainer
own the cached WebRenderImageProvider.

Differential Revision: https://phabricator.services.mozilla.com/D126598
2021-11-27 11:47:37 +00:00
Andrew Osmond
68f4024956 Bug 1711061 - Part 4. Implement AnimationSurfaceProvider for animated rasterized images. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126790
2021-11-27 11:47:37 +00:00
Andrew Osmond
564271844a Bug 1711061 - Part 3. Add WebRenderImageProvider and implement for rasterized providers. r=tnikkel
This provides the framework to allow ISurfaceProvider objects to
implement WebRenderImageProvider. It is straightforward for rasterized
providers (DecodedSurfaceProvider, and SimpleSurfaceProvider). Later
parts in this series will provide the necessary changes for blob
recordings and for animatedi images.

Differential Revision: https://phabricator.services.mozilla.com/D126597
2021-11-27 11:47:36 +00:00
Andrew Osmond
6a2ad86d3d Bug 1711061 - Part 2. Add imgIContainer::GetImageProvider skeleton. r=tnikkel
In later parts in this series, GetImageProvider will replace
GetImageContainerAtSize. This will be a more specialized and lower
overhead means to get a wr::ImageKey for a particular surface.

Differential Revision: https://phabricator.services.mozilla.com/D126596
2021-11-27 11:47:36 +00:00
Andrew Osmond
c4d508a363 Bug 1711061 - Part 1. Remove SourceSurfaceMappedData surface deduplication from memory reports. r=tnikkel
We no longer use SourceSurfaceMappedData because we only support
SourceSurfaceSharedData-backed imgFrame in the SurfaceCache now.

Differential Revision: https://phabricator.services.mozilla.com/D126595
2021-11-27 11:47:36 +00:00
ssummar
b9d6fce436 Bug 1530209 - Removed context argument from various methods. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D129797
2021-11-24 11:25:41 +00:00
Chris Martin
661bf87677 Bug 1721850 - Remote Windows nsIconChannel r=nika
Differential Revision: https://phabricator.services.mozilla.com/D130701
2021-11-17 14:50:49 +00:00
Chris Martin
265d65b049 Bug 1721850 - Refactor of nsIconChannel (Part 2) r=nika
This is just moving things around -- No functionality changes

Differential Revision: https://phabricator.services.mozilla.com/D130689
2021-11-17 14:50:48 +00:00
Chris Martin
80c0440e3d Bug 1721850 - Refactor of nsIconChannel (Part 1) r=nika
This refactor makes much of the behavior of Windows nsIconChannel into static
free functions, more similar to Linux. This allows a similar remote-ing
strategy to be used on Windows.

Part 2 of this change will just re-organize everything. This change was
impossible to review with all the moving of things.

Differential Revision: https://phabricator.services.mozilla.com/D130708
2021-11-17 14:50:48 +00:00
Jeff Muizelaar
f3335d09ea Bug 1739661. Avoid using D2D when drawing SVG. r=aosmond
This avoids using D2D when creating a cached SVG image.
We can still hit D2D if we're not caching, but that should
be less common.

Differential Revision: https://phabricator.services.mozilla.com/D130513
2021-11-10 16:23:17 +00:00
Gerald Squelart
5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Ulrich-Matthias Schäfer
9bb35351e1 Bug 1511670 - Add WebP image encoding support. r=aosmond
Depends on D130547

Differential Revision: https://phabricator.services.mozilla.com/D130548
2021-11-06 13:09:07 +00:00
Cristian Tuns
1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Timothy Nikkel
dadf71f768 Bug 1724331. Allow the png encoder to take options specifying the zlib level and filters to use. r=aosmond
This lets me write a test for this and lets other consumers tweak the compression settings if they would like.

Differential Revision: https://phabricator.services.mozilla.com/D130024
2021-11-05 08:53:27 +00:00
Timothy Nikkel
e8303eb9f6 Bug 1724331. Adjust tests that depend on the exact output of the png encoder. r=aosmond
I verified that the pngs I'm changing here were pixel identifical before/after.

Differential Revision: https://phabricator.services.mozilla.com/D130023
2021-11-05 08:53:27 +00:00
Timothy Nikkel
dd036342aa Bug 1724331. Change default png encoder settings. r=aosmond
Rationale is in the bug. Short version we match what Chrome does for much faster encoding, producing larger files for content that png compression works well for, and smaller files (while still being faster) for photo like content.

Differential Revision: https://phabricator.services.mozilla.com/D130022
2021-11-05 08:53:26 +00:00
Timothy Nikkel
8b504c2676 Bug 1724331. Enable libpng defines PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED and PNG_WRITE_FILTER_SUPPORTED. r=aosmond
Other than compiler a bit more code this should have no functional effect, we're setting the values to their default values we had before.

Differential Revision: https://phabricator.services.mozilla.com/D130021
2021-11-05 08:53:26 +00:00
Gerald Squelart
7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Timothy Nikkel
1d3899d566 Bug 1737038. Adjust tests that depend on the exact output of the png encoder. r=aosmond
I verified that the pngs I'm changing here were pixel identifical before/after.

Differential Revision: https://phabricator.services.mozilla.com/D130020
2021-11-04 00:17:08 +00:00
Jon Bauman
bd29528356 Bug 1739032 - Update mp4parse-rust to a257137. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D130284
2021-11-03 20:06:58 +00:00
Sandor Molnar
f5bbecdcc2 Backed out 13 changesets (bug 1711061) on devs request. CLOSED TREE
Backed out changeset c4f073f7e3a3 (bug 1711061)
Backed out changeset aced4b672fb4 (bug 1711061)
Backed out changeset 3687e798f665 (bug 1711061)
Backed out changeset 7b471990ea86 (bug 1711061)
Backed out changeset 1014a95f540e (bug 1711061)
Backed out changeset a37b3091281d (bug 1711061)
Backed out changeset 96a0ef35881b (bug 1711061)
Backed out changeset 38890cc266fb (bug 1711061)
Backed out changeset be73004c0850 (bug 1711061)
Backed out changeset b964576ae53d (bug 1711061)
Backed out changeset d453c5219255 (bug 1711061)
Backed out changeset 0145b538175b (bug 1711061)
Backed out changeset 41ba2e2a2d13 (bug 1711061)
2021-10-29 00:36:30 +03:00