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

276 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez ec7a1d06ff Bug 1864425 - Remove PendingAnimationTracker. r=birtles
Instead of starting transitions and animations as a result of a paint,
use the refresh driver tick to do this.

This sets the transition-ready time to the current time during the next
refresh driver tick that it was started on (see mSawTickWhilePending).

This is similar to what's described in the bugs comments, and seems to
work nicely in practice.

We could easily change that (current time) by a paint-based time if
needed (when available), which would be more similar to what we were
doing. But I'd rather do the simple thing for now, and land this shortly
after the soft freeze is over so that we have time to watch out for
regressions.

There's one regression on a test that birtles wrote (using an XHR doc
and switching the timeline to a rendered doc's timeline).

We use the timeline's document rather than the target document to
determine whether to trigger animations now. That's one of the cases
where we'd keep vsync perma-running without this patch, and Chrome also
fails that test. Maybe the test should be removed / the spec should be
tweaked to allow this behavior?

This causes some progression in some CSS transitions tests too, and I
added an extra test for the vsync behavior.

Over-all this is much simpler to reason about and I think we should try
to do this.

Differential Revision: https://phabricator.services.mozilla.com/D193583
2023-11-20 09:31:41 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Dan Robertson 68be4359ce Bug 1853991 - Refactor SVGSVGElement intrinsic size APIs to return LengthPercentage. r=dholbert
- Use LengthPercentage as the return type for GetIntrinsicHeight and
   GetIntrinsicWidth. This allows the caller to handle percent values.
   No callers have additional logic to handle percent values as of now,
   but this may change in the future, for compat; see last paragraph of
   bug 700533 comment 69.

 - Refactor intrinsic size function definitions.

Differential Revision: https://phabricator.services.mozilla.com/D176974
2023-09-26 20:28:06 +00:00
Timothy Nikkel dff579d30a Bug 1831457. Call MaybeRestrictSVGContext in VectorImage::GetImageProvider. r=aosmond
The main part of MaybeRestrictSVGContext blocks context paint where is it not allowed. The css style that enables it is already restricted to chrome, see https://searchfox.org/mozilla-central/source/servo/components/style/properties/longhands/inherited_svg.mako.rs#208 so this isn't a big deal.

We've had a test that context paint isn't enabled in content for a long time

https://searchfox.org/mozilla-central/rev/85b4f7363292b272eb9b606e00de2c37a6be73f0/layout/reftests/svg/as-image/reftest.list#59

So this never regressed. So this just makes it consistent and blocks it further and executes the preserve aspect ratio code.

Differential Revision: https://phabricator.services.mozilla.com/D177216
2023-07-06 11:59:34 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Nicolas Silva 96d8fb28ba Bug 1814878 - Use the rasterSize to decide whether to fall back. r=jrmuizel,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168808
2023-02-04 01:28:42 +00:00
Timothy Nikkel 532b16706c Bug 1814878. Use fallback rendering if rasterizing a vector image will use too big of a surface. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D168784
2023-02-03 13:46:58 +00:00
Andrew Osmond 9d245b8325 Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160121
2022-10-28 12:36:06 +00:00
Cristian Tuns 1303ee58d8 Backed out 3 changesets (bug 1794722) for causing multiple failures on RemoteProcessMonitor CLOSED TREE
Backed out changeset 0217af5b1aa6 (bug 1794722)
Backed out changeset d7805be9dfb3 (bug 1794722)
Backed out changeset 0093f071f1a5 (bug 1794722)
2022-10-27 20:52:36 -04:00
Andrew Osmond 93abf26cbc Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160121
2022-10-28 00:08:03 +00:00
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
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
Jeff Muizelaar ee8edce30e Bug 1755975 - Pass rect or path directly to Clip() instead of manually creating a path. r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D139038
2022-02-24 14:42:35 +00:00
Norisz Fay f0dc70995f Backed out changeset f06972b41abe (bug 1755975) for causing multiple reftest failures CLOSED TREE 2022-02-18 04:04:47 +02:00
Jeff Muizelaar 0cfa7fdb40 Bug 1755975 - Pass rect or path directly to Clip() instead of manually creating a path. r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D139038
2022-02-17 20:24:38 +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 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
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 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 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
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
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 77d044e944 Bug 1711061 - Part 11. Implement VectorImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126604
2021-10-27 01:24:35 +00:00
Andrew Osmond d46a011943 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-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 7d6439b84a Bug 1711061 - Part 11. Implement VectorImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126604
2021-10-26 13:28:27 +00:00
Andrew Osmond ca9bcdf869 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-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
Olli Pettay 77bb9e9b0e Bug 1734811 - consider to use higher priority for the imglib tasks r=tnikkel
Depends on D127935

Differential Revision: https://phabricator.services.mozilla.com/D127936
2021-10-08 19:29:37 +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