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

347 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 8f69882854 Bug 1628657 - Make canvas use computed reference frame transforms. r=kvark
When a transform depends on the layout size of an element, one can see
visual distortions caused by the difference between the unsnapped size
used in the transform, and the snapped size calculated during scene
building. Ideally we could compute the transform after we snap, rather
than before. This patch adds support for a computed reference frame
which takes parameters to calculate the ideal transform dynamically.

In a future patch, we should make videos take advantage of this same
mechanism to avoid similar problems. This requires support for mirroring
and rotations.

Differential Revision: https://phabricator.services.mozilla.com/D77956
2020-06-11 20:46:05 +00:00
Lee Salzman 17ad4b4e4d Bug 1641671 - move FontInstance bools into FontInstanceFlags. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D77369
2020-05-29 01:49:22 +00:00
Lee Salzman ff67b8251d Bug 1641671 - represent font size as f32 to avoid quantization issues. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D77367
2020-05-29 01:48:52 +00:00
Miko Mynttinen 6013e7cd95 Bug 1640457 - Discard pending WR display items if the Gecko item will be pushed as an image r=jrmuizel
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.

Differential Revision: https://phabricator.services.mozilla.com/D77095
2020-05-27 16:45:08 +00:00
Nicolas Silva bdabdf112f Bug 1635016 - Remove the rest of the SetTransactionLogging glue. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74866
2020-05-18 12:11:33 +00:00
Nicolas Silva e37f0f8d60 Bug 1612440 - Merge the webrender::Transaction and webrender_api::TransactionMsg structs. r=gw
One of the last steps towards letting the api send scene building requests directly. I'll clean up the names after everything is in place.

Differential Revision: https://phabricator.services.mozilla.com/D74054
2020-05-22 10:06:12 +00:00
Glenn Watson af3ddc2628 Bug 1617524 - Fix crash in get_relative_transform edge case. r=jnicol
Previously, WR would attempt to detect at the start of frame
building if the spatial node of any picture cache contained
a non-axis-aligned transform, and disable picture caching in
that edge case.

However, picture caching can't (currently) be disabled when the
native compositor is active. In this mode, picture caching was
force enabled, causing an assertion failure due to unexpected
coordinate systems when updating pictures.

This patch changes the way the detection of scroll root logic
works such that we don't consider any scroll frame inside a
reference frame to be a valid scroll root for picture caching
purposes. Thus it's not possible to create a picture cache
where the reference spatial node has a non-axis-aligned transform.

Differential Revision: https://phabricator.services.mozilla.com/D75890
2020-05-21 07:42:32 +00:00
Nicolas Silva c59b80d2ff Bug 1612440 - Move blob and font resources to the RenderApi. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74301
2020-05-19 15:16:40 +00:00
Nicolas Silva 03436162ac Bug 1612440 - Use a single shared font instance map in various place. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74299
2020-05-19 12:52:06 +00:00
Nicolas Silva 2440fa9497 Bug 1612440 - Move some types to webrender_api. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74298
2020-05-19 07:54:25 +00:00
Nicolas Silva 1cc29ae322 Bug 1612440 - Simplify the SetDisplayList message. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74300
2020-05-19 07:53:16 +00:00
Nicolas Silva 7716ebe2a3 Bug 1612440 - Forward glyph dimension and index requests through the scene builder thread. r=gw
This prevents the request from racing ahead of the AddFontInstance message which follows the transaction through the scene builder thread and silently returning zero-sized glyphs.

Differential Revision: https://phabricator.services.mozilla.com/D72906
2020-05-19 07:52:25 +00:00
Glenn Watson de2845e48f Bug 1635610 - Enable per scroll root picture cache slices by default. r=jrmuizel,aosmond
Part 1 of this patch enables subpixel AA in more cases when there
are multiple picture cache slices. Because of this, we can enable
extra picture cache slices by default, as a performance win for
the general case.

Users who want to force subpixel AA in more cases, at the cost of
performance can manually set the about:config value called
gfx.webrender.quality.force-subpixel-aa-where-possible.

Differential Revision: https://phabricator.services.mozilla.com/D75465
2020-05-16 03:09:57 +00:00
Glenn Watson 4c6a3862df Bug 1636616 - Fix invalidations occuring when display port changes. r=Bert
On some pages, primitives other than rectangles may have their
clip rect affected by the display port, which was causing incorrect
invalidations and extra rasterization work.

Remove clip_by_tile check, and clamp clip rect to tile boundaries
for all primitive types. Also switch to a more efficient min/max
representation of the clip rect for primitive dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D74582
2020-05-11 23:05:42 +00:00
Nicolas Silva be515a3296 Bug 1612440 - Add BlobImageHandler::create_similar. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74297
2020-05-11 14:00:49 +00:00
Nicolas Silva ee478cb6d7 Bug 1612440 - Renamed clone_sender into create_sender. r=gw
This was split off from https://phabricator.services.mozilla.com/D71992

Depends on D74293

Differential Revision: https://phabricator.services.mozilla.com/D74296
2020-05-07 19:45:20 +00:00
Nicolas Silva f4e54a21aa Bug 1612440 - Make send_transaction take &mut self. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74293
2020-05-11 10:27:26 +00:00
Nicolas Silva f16e775358 Bug 1612440 - Remove ApiMsg::UpdateResources. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72397
2020-05-11 10:27:26 +00:00
Glenn Watson fb839d472b Bug 1635022 - Add support for specifying blend container r=kats,Bert
Previously, WR would internally mark a parent stacking context
as requiring isolation when a stacking context with mix-blend-mode
was encountered.

However, this adds significant complexity to scene building in
WR, meaning that several decisions related to stacking context
redundancy, clip chain roots must be delayed until the stacking
context is popped.

By requiring the display list to annotate blend containers (Gecko
already has all this information available), we will be able to
simplify this scene building logic, which will unblock some
ongoing improvements to how clips are handled.

The patch introduces stacking context flags, and ports the existing
is_backdrop_root bool to be part of these flags. It also removes
an unused old field, cache_tiles.

Differential Revision: https://phabricator.services.mozilla.com/D73597
2020-05-04 20:28:44 +00:00
Daniel Varga d0212aae27 Backed out changeset a8ca75f3002d (bug 1633985) on request by dev 2020-04-30 01:58:25 +03:00
Glenn Watson ab3883a1e7 Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 21:54:14 +00:00
Dorel Luca f906702a66 Backed out changeset 0a9371673354 (bug 1633985) for Webrender bustages. CLOSED TREE 2020-04-30 00:03:23 +03:00
Glenn Watson c222acf8ae Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 17:14:50 +00:00
Josh Matthews 522ffb1f8e Bug 1633557 - Add Serialize/Deserialize for structs needed by Servo. r=jdm
[import_pr] From https://github.com/servo/webrender/pull/3936

Differential Revision: https://phabricator.services.mozilla.com/D72749
2020-04-27 21:06:36 +00:00
Glenn Watson 43db714391 Bug 1632705 - Part 3 - Add API for rounded rect clips. r=Bert
This adds the last remaining explicit API for defining clips of
a specific type, and ports wrench and examples to use them.

Differential Revision: https://phabricator.services.mozilla.com/D72284
2020-04-26 23:30:48 +00:00
Glenn Watson b954ae4e56 Bug 1632705 - Part 2 - Add display item for rectangle clips. r=nical
This allows defining rectangle clips directly, rather than via
the generic clip region methods.

This patch doesn't make use of it in Gecko yet, but it will do
once we add the remaining rounded rect API.

Differential Revision: https://phabricator.services.mozilla.com/D72268
2020-04-27 09:08:04 +00:00
Glenn Watson 63892870eb Bug 1632705 - Part 1 - Remove complex clips from scroll frame definitions. r=kats,Bert
They aren't used, so can easily be removed as the first part of
this seried of patches.

If this functionality is ever required, it can be handled by the
caller defining complex clip nodes explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D72261
2020-04-24 18:29:38 +00:00
Glenn Watson 31dabce5a8 Bug 1632409 - Separate image mask API from the generic clip API in WR. r=kats
Separating out the generic clip definition API into image masks
(and other types in future) makes the serialized data smaller. More
importantly, it will allow us to simplify some of the WR clip internals
in future and optimize the performance spent in clip chain handling.

Differential Revision: https://phabricator.services.mozilla.com/D72125
2020-04-23 20:44:21 +00:00
Glenn Watson a252244f3c Bug 1632389 - Remove image mask support from scroll layer API. r=nical
This is not used, so we can remove it as the first part of modifying
the public clip API in order to allow some internal optimizations.

If callers ever want to make use of this in future, it can be
achieved by placing an image mask clip node in the clip chain for
the primitives in the scroll layer.

Differential Revision: https://phabricator.services.mozilla.com/D72099
2020-04-23 11:39:42 +00:00
Nicolas Silva 3a6da68bf2 Bug 1612440 - Wrap the shared font instance map to a type exposed in the api crate. r=gw
This is a small preliminary refactoring that will be needed to let the api talk to the scene builder thread.

Differential Revision: https://phabricator.services.mozilla.com/D71325
2020-04-22 08:49:38 +00:00
Nicolas Silva 4f156a4330 Bug 1612440 - Don't implement Serialize/Deserialize in some parts of th API. r=gw
Now that the capture code is gone, we don't use these serde implementations. They get in the way of changing the way transactions are represented so I'd like to remove a bunch of them for now.

Differential Revision: https://phabricator.services.mozilla.com/D71604
2020-04-22 08:48:24 +00:00
Andrew Osmond 84731cd82b Bug 1561367 - Implement initial support for capturing multiple frames. r=kvark
This patch adds support for the capture and replaying of multiple frames
during normal operation of Firefox. Ctrl + Shift + 6 starts capturing
and pressing it again stops capturing. It attempts to capture the minimum
amount of data required to replay a sequence for debugging purposes.

There are several known limitations, particularly surrounding replaying
when transitioning between snapshots of the resource cache. It will
reload the entire document set, causing greater delay between frames.
Should you advance too quickly, it may also panic due to a race between
the current frame still being generated, and the new frame resetting the
resource cache state. These should be resolved with time, and the
current implementation should be workable to at least capture/debug most
animated issues with some effort.

It also adds support for loading dynamic properties which is necessary
for accurate replaying of a captured frame (sequence or individual)
which are in the middle of an animation.

Differential Revision: https://phabricator.services.mozilla.com/D59755
2020-04-20 16:03:53 +00:00
Stefan Hindli 84357fecdc Backed out changeset 419be9960357 (bug 1561367) for causing wrench bustages CLOSED TREE 2020-04-20 17:22:53 +03:00
Andrew Osmond 69a83fc13a Bug 1561367 - Implement initial support for capturing multiple frames. r=kvark
This patch adds support for the capture and replaying of multiple frames
during normal operation of Firefox. Ctrl + Shift + 6 starts capturing
and pressing it again stops capturing. It attempts to capture the minimum
amount of data required to replay a sequence for debugging purposes.

There are several known limitations, particularly surrounding replaying
when transitioning between snapshots of the resource cache. It will
reload the entire document set, causing greater delay between frames.
Should you advance too quickly, it may also panic due to a race between
the current frame still being generated, and the new frame resetting the
resource cache state. These should be resolved with time, and the
current implementation should be workable to at least capture/debug most
animated issues with some effort.

It also adds support for loading dynamic properties which is necessary
for accurate replaying of a captured frame (sequence or individual)
which are in the middle of an animation.

Differential Revision: https://phabricator.services.mozilla.com/D59755
2020-04-20 12:53:03 +00:00
Nicolas Silva ea0d91e150 Bug 1587713 - Remove the late blob rasterization code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D49186
2020-04-16 20:13:24 +00:00
Nicolas Silva a7bf827f4d Bug 1630212 - Remove non-tiled blob images. r=jrmuizel
Gecko always tiles blobs. The other code path is untested and a tad complicated, let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D71021
2020-04-16 20:13:24 +00:00
Nicolas Silva 83cb2f1fbc Bug 1627299 - Remove MsgSender/MsgReceiver. r=kvark
These just wrap regular std Sender/Receiver without providing any value. Serialize/Deserialize was implement manually for MsgSender/MsgReceiver to assert. Serde being amazing, it provides with annotations to not require the traits to be implemented on some enum variants and assert at runtime which functionally equivalent but less error-prone than the fake trait implementations.

Removing the rest of channel.rs is coming in a followup.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 16:58:39 +00:00
Nicolas Silva e1d3184a15 Bug 1627299 - Remove the separation between API messages and payloads. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D69979

--HG--
extra : moz-landing-system : lando
2020-04-14 16:58:39 +00:00
Dzmitry Malyshau 0e42a4799d Bug 1628772 - Update core-foundation dependency to 0.7 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70432

--HG--
extra : moz-landing-system : lando
2020-04-11 20:14:41 +00:00
Mihai Alexandru Michis 5beb91b795 Backed out changeset d91a97562b48 (bug 1628772) for causing failures regarding core-foundation.
CLOSED TREE
2020-04-10 03:42:05 +03:00
Dzmitry Malyshau feed464a5d Bug 1628772 - Update core-foundation dependency to 0.7 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70432

--HG--
extra : moz-landing-system : lando
2020-04-09 20:57:18 +00:00
Jim Blandy c5713e75b5 Bug 1628508: Add 'IMPLICIT' comment for webrender_api::display_item::ScrollFrameDisplayItem. DONTBUILD r=gw
Differential Revision: https://phabricator.services.mozilla.com/D70269

--HG--
extra : moz-landing-system : lando
2020-04-08 23:31:36 +00:00
Miko Mynttinen fa3904e234 Bug 1624016 - Memory report WebRender display list and display item cache r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68279

--HG--
extra : moz-landing-system : lando
2020-04-01 18:43:32 +00:00
Glenn Watson bdde050f84 Bug 1625816 - Fix rectangle display item bounds being affected by display port clip. r=nical
This can cause extra invalidations in picture caching.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 10:01:26 +00:00
Nicolas Silva e0484d35c5 Bug 1625220 - Remove a number of Foo::from_untyped(&bar.to_untyped()) casts. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D68470

--HG--
extra : moz-landing-system : lando
2020-03-31 10:03:47 +00:00
Stefan Hindli 73e4464101 Backed out 3 changesets (bug 1625220) for causing wrench bustages CLOSED TREE
Backed out changeset fbeb908b3513 (bug 1625220)
Backed out changeset 793808082134 (bug 1625220)
Backed out changeset 17bf8121665a (bug 1625220)
2020-03-31 12:59:52 +03:00
Nicolas Silva d5ee0ec037 Bug 1625220 - Remove a number of Foo::from_untyped(&bar.to_untyped()) casts. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D68470

--HG--
extra : moz-landing-system : lando
2020-03-30 18:49:05 +00:00
cbrewster 5c34d757d0 Bug 1618000: Part 2: Clamp blur radius based on scale factors r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D65805

--HG--
extra : moz-landing-system : lando
2020-03-26 00:00:02 +00:00
Razvan Maries 3389ad3b1f Backed out 2 changesets (bug 1618000) for wrench bustages. CLOSED TREE
Backed out changeset c72b18b22267 (bug 1618000)
Backed out changeset 9bc71e7b317b (bug 1618000)
2020-03-23 21:00:24 +02:00
cbrewster 34e8ddc337 Bug 1618000: Part 2: Clamp blur radius based on scale factors r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D65805

--HG--
extra : moz-landing-system : lando
2020-03-23 18:22:32 +00:00