Граф коммитов

328 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 4414d74633 Bug 1779598 - Stop passing around Maybe<SVGImageContext>. r=aosmond
All its members are optional, so we can just use it as a plain struct
rather than Maybe<> all around, which simplifies the code and prevents
silly bugs like bug 1779592.

Mostly automatic via:

  rg -l 'SVGImageContext' . | xargs sed -i 's/Maybe<SVGImageContext>/SVGImageContext/g'

With trivial build fixes.

Not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151846
2022-07-14 16:03:25 +00:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
Razvan Cojocaru 47f3281d5e Bug 1775209 - Change local variables of type gfx::Size, which actually represent scales, to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D149866
2022-06-24 19:00:38 +00:00
Andrew Osmond 2a6e181df2 Bug 1775495 - Avoid trigger extra async image decodes when sync decodes are requested. r=jrmuizel
When we request a sync decode, if there is an outstanding pending
async decode, but we don't have all the network data, we would end up
triggering an extra async decode. This patch ensures that we only
trigger sync decodes if they will actually execute as sync.

Differential Revision: https://phabricator.services.mozilla.com/D150008
2022-06-22 17:31:28 +00:00
Timothy Nikkel dd3e9a6d5f Bug 1769939. Avoid a couple of unnecessary image decodes at intrinsic size in some cases. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D146687
2022-05-21 06:44:19 +00:00
Timothy Nikkel 2e15b2af1d Bug 1769195. Don't bother to try to do a partial draw of a background image if we haven't decoded any pixels. r=aosmond
The draw will be pointless, and it regresses one perf metric.

Differential Revision: https://phabricator.services.mozilla.com/D146685
2022-05-20 09:02:32 +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
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
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 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 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
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
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
Andrew Osmond c49ed44331 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-10-27 01:24:36 +00:00
Andrew Osmond aa554acc2f Bug 1711061 - Part 6. Implement RasterImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126599
2021-10-27 01:24:33 +00:00
Andrew Osmond dfee884d74 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-10-27 01:24:33 +00:00
Andrew Osmond d4b2d17796 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-10-27 01:24:31 +00:00
Sandor Molnar 6632079d8d Backed out 13 changesets (bug 1711061) for causing browser-chrome failures in test/performance/browser_startup_images. CLOSED TREE
Backed out changeset 5988220f56b8 (bug 1711061)
Backed out changeset cb7721d7ce49 (bug 1711061)
Backed out changeset 343746ffae73 (bug 1711061)
Backed out changeset 000940244dcf (bug 1711061)
Backed out changeset 27565d5ae08d (bug 1711061)
Backed out changeset f3b2379d971b (bug 1711061)
Backed out changeset d4b3d0fa1771 (bug 1711061)
Backed out changeset 9af5b3f2225f (bug 1711061)
Backed out changeset da992effeff1 (bug 1711061)
Backed out changeset 6b2bc6c16b9f (bug 1711061)
Backed out changeset ac2792d42be2 (bug 1711061)
Backed out changeset cb00177e655e (bug 1711061)
Backed out changeset 8d5261184226 (bug 1711061)
2021-10-26 18:04:34 +03:00
Andrew Osmond 6ee464104f 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-10-26 13:28:27 +00:00
Andrew Osmond 836ad9882e Bug 1711061 - Part 6. Implement RasterImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126599
2021-10-26 13:28:25 +00:00
Andrew Osmond a2abd63705 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-10-26 13:28:24 +00:00
Andrew Osmond a122ca2764 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-10-26 13:28:23 +00:00
Jeff Muizelaar f76f41feb4 Bug 1736236 - Remove obsolete LayerManager.h. r=gfx-reviewers,lsalzman
This adds a bunch of #include "WindowRenderer.h" in places
that were getting it implicitly before.

Differential Revision: https://phabricator.services.mozilla.com/D128687
2021-10-17 23:00:47 +00:00
Andrew Osmond 774ef22598 Bug 1732115 - Part 5. Remove reorientation code from RasterImage. r=tnikkel
This is now all handled in the layers below.

Differential Revision: https://phabricator.services.mozilla.com/D126383
2021-10-06 14:41:18 +00:00
Andrew Osmond 09266efcbc Bug 1732115 - Part 3. Refactor decoder pipeline to partially use Unoriented/OrientedPixel. r=tnikkel
Rather than change every use of IntSize/Rect/Point in image/, this patch
attempts to draw the line at the relevant parts of the decoding pipeline
to prevent confusion about which size and orientation we are working
with.

Differential Revision: https://phabricator.services.mozilla.com/D126381
2021-10-06 14:41:17 +00:00
Matt Woodrow 5fa3be57b1 Bug 1728925 - Convert IsImageContainerAvailable to use WindowRenderer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124427
2021-09-05 22:36:45 +00:00
Andrew Osmond e9c57362fa Bug 1728890 - Remove unused ImageContainer related image code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124396
2021-09-02 21:46:14 +00:00
Matt Woodrow 15827952f9 Bug 1727423 - Convert some usage of LayerManager to WindowRenderer in image/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123554
2021-08-25 07:35:17 +00:00
criss 58591696b7 Backed out 2 changesets (bug 1727423) for causing build bustages
Backed out changeset 9b2ca95a6527 (bug 1727423)
Backed out changeset 1f01fcbd46a8 (bug 1727423)
2021-08-25 04:41:35 +03:00
Matt Woodrow 2aa361b420 Bug 1727423 - Convert some usage of LayerManager to WindowRenderer in image/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123554
2021-08-25 01:04:25 +00:00
Mike Hommey daab1d49e3 Bug 1722454 - Remove --disable-skia. r=firefox-build-system-reviewers,gfx-reviewers,nical,andi
It has been unsupported since bug 1323303, > 4 years ago.

This removes MOZ_ENABLE_SKIA but keeps USE_SKIA for moz2d for now

Differential Revision: https://phabricator.services.mozilla.com/D120933
2021-07-29 23:29:43 +00:00
Andrew Osmond 35eed7acf6 Bug 1711948 - Add surfaces from image containers to the memory report. r=tnikkel
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
2021-05-20 12:31:27 +00:00
Andrew Osmond 879f78a8df Bug 1704792 - Part 5. Add plumbing to move/store ImageIntRegion. r=jrmuizel
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
2021-05-13 16:24:07 +00:00
Andrew Osmond 90e8b6554c Bug 1704792 - Part 1. Add SourceSurfaceBlobImage to manage the blob recording for SVG images. r=jrmuizel,nical
Differential Revision: https://phabricator.services.mozilla.com/D111835
2021-05-13 16:24:06 +00:00
Emilio Cobos Álvarez 6c4266f7f7 Bug 1680387 - Read and expose EXIF image resolution data. r=tnikkel,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113264
2021-05-05 09:41:23 +00:00
Iulian Moraru b21df91635 Backed out 3 changesets (bug 1680387) for causing browser chrome failures on browser_bug592641.js. CLOSED TREE
Backed out changeset 65616921e520 (bug 1680387)
Backed out changeset 51531850a9a2 (bug 1680387)
Backed out changeset 0c1c5e1f901b (bug 1680387)
2021-05-04 16:28:17 +03:00
Emilio Cobos Álvarez f7f8e8d153 Bug 1680387 - Read and expose EXIF image resolution data. r=tnikkel,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113264
2021-05-04 10:24:06 +00:00
Florian Quèze 821491b1c4 Bug 1704103 - add 'Image Paint' and 'Image Load' profiler markers, r=gerald,tnikkel.
Differential Revision: https://phabricator.services.mozilla.com/D111420
2021-04-14 09:00:13 +00:00
Emilio Cobos Álvarez 97ec9ca623 Bug 1704332 - Remove various image-orientation related prefs. r=tnikkel
These shipped in 77.

Differential Revision: https://phabricator.services.mozilla.com/D111550
2021-04-11 17:39:12 +00:00
Alexis Beingessner 70c9b7ef2c Bug 1681546 - rename MOZ_ATOMIC_BITFIELDS methods to Load/Store. r=valentin,necko-reviewers
I was running into issues where these names would conflict with the type's own Get/Set methods
and these names have the added benefit of indicating a bit more that atomic stuff is going on.

Differential Revision: https://phabricator.services.mozilla.com/D99268
2020-12-09 18:14:55 +00:00
Alexis Beingessner ab37cbed76 Bug 1601980 - use MOZ_ATOMIC_BITFIELDS in imagelib to avoid races on flags. r=aosmond,decoder
Differential Revision: https://phabricator.services.mozilla.com/D91633
2020-10-01 13:22:49 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Cameron McCormack d009767bb6 Bug 1631214 - Fix oriented image invalidation rectangle calculation when a Flip is present. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75647
2020-05-15 23:43:42 +00:00
Timothy Nikkel 7994dd5c2d Bug 1634839. Call UpdateState on the animation state in RasterImage::NotifyProgress. r=aosmond
Since AnimationState::UpdateState now depends on a specific frame of the animation being in the surface cache we need to call UpdateState whenever we add a new frame.

Depends on D73583

Differential Revision: https://phabricator.services.mozilla.com/D73584
2020-05-04 18:49:13 +00:00
Timothy Nikkel 9f72de06ce Bug 1634839. Teach RasterImage::NotifyDecodeComplete to deal with getting notified about new frames. r=aosmond
It takes a frame count argument but probably never gets a value we haven't already seen in a NotifyProgress call, so this doesn't fix anything as far as I know.

Depends on D73564

Differential Revision: https://phabricator.services.mozilla.com/D73583
2020-05-04 18:46:53 +00:00
Timothy Nikkel 3d235e9172 Bug 1631365. img.decode never fulfills or rejects if the image is too big to fit into the surface cache. r=aosmond
Since we don't support downscaling animated images we'll need something like this even we were to try to request a smaller sized decode.

Differential Revision: https://phabricator.services.mozilla.com/D71523
2020-04-20 21:04:45 +00:00
Timothy Nikkel 008ffcf520 Bug 1629490. In RasterImage invalidate if we get a non-empty dirty rect, don't ignore it if mFrameAdvanced is false. r=aosmond
We invalidate for more things than just frames advancing (if we are redecoding and still showing the same frame as before discarding for example). So there is no reason that the dirty rect and a frame being advanced should be linked.

Differential Revision: https://phabricator.services.mozilla.com/D71483
2020-04-20 03:38:40 +00:00