Commit Graph

14110 Commits

Author SHA1 Message Date
Bob Owen
261ddce4a8 Bug 1630521: Allow CanvasDrawEventRecorder to control surface destruction recording, so it can be done on the main thread. r=jrmuizel
The recording by CanvasDrawEventRecorder into the ring buffer is not thread-safe
and so must all occur on the same (main) thread.
In addition to that it sometimes needs to send IPC messages via the PCanvas
protocol, which also can only be done on the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D71174
2020-04-16 17:13:16 +00:00
Miko Mynttinen
0075ba9551 Bug 1619367 - Fix mask/filter opacity optimizations with WebRender r=jrmuizel
This patch fixes two opacity/mask optimizations when WebRender is in use:
- The first optimization defers opacity handling and applies it during painting of nsDisplayMasksAndClipPaths if it is the only item inside nsDisplayOpacity. This was broken because WebRenderCommandBuilder did not invalidate the mask image when this decision changed.
- The second optimization applies opacity directly to stacking context in |nsDisplayMasksAndClipPaths::CreateWebRenderCommands()| with non-polygonal clip-paths. This was relying on the above optimization incorrectly triggering, which flattened away the opacity container. However, if the nsDisplayOpacity was active or contained more than one item, the opacity could be applied twice.

Differential Revision: https://phabricator.services.mozilla.com/D68995
2020-04-16 15:39:33 +00:00
Brindusan Cristian
c6bf1adfa6 Backed out changeset dfb973b3e25c (bug 1619367) for reftest failures at mask-opacity-invalidation-1.html. CLOSED TREE 2020-04-16 18:21:01 +03:00
Miko Mynttinen
addbfb5585 Bug 1619367 - Fix mask/filter opacity optimizations with WebRender r=jrmuizel
This patch fixes two opacity/mask optimizations when WebRender is in use:
- The first optimization defers opacity handling and applies it during painting of nsDisplayMasksAndClipPaths if it is the only item inside nsDisplayOpacity. This was broken because WebRenderCommandBuilder did not invalidate the mask image when this decision changed.
- The second optimization applies opacity directly to stacking context in |nsDisplayMasksAndClipPaths::CreateWebRenderCommands()| with non-polygonal clip-paths. This was relying on the above optimization incorrectly triggering, which flattened away the opacity container. However, if the nsDisplayOpacity was active or contained more than one item, the opacity could be applied twice.

Differential Revision: https://phabricator.services.mozilla.com/D68995
2020-04-16 14:08:37 +00:00
Kartikaya Gupta
6172dc3568 Bug 1627326 - Provide more meaningful values for the stuck sides. r=botond,hiro
As described in bug 1630274, this has some unfixed cases, but it should
give good results in most real-world cases, where the magnitude of transient
async scrolling is relatively low.

Depends on D71083

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

--HG--
extra : moz-landing-system : lando
2020-04-16 03:21:06 +00:00
Kartikaya Gupta
8cb7d4e606 Bug 1627326 - Add some plumbing to provide the "stuck sides" flags. r=botond,hiro
This is just plumbing, no functional change. The current usage of eBottom is
parameterized and the eBottom hard-coded value is pushed out to the callers.

Depends on D70912

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

--HG--
extra : moz-landing-system : lando
2020-04-16 03:21:24 +00:00
Bob Owen
6254206e21 Bug 1630223: Replace remaining occurrences of Unsound_IsClosed with !CanSend in CanvasTranslator. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71039

--HG--
extra : moz-landing-system : lando
2020-04-15 19:57:38 +00:00
Kartikaya Gupta
731e0c0820 Bug 1627362 - Improve logging for fixed/sticky data on the WR codepath. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D70912

--HG--
extra : moz-landing-system : lando
2020-04-15 20:01:05 +00:00
Kartikaya Gupta
96ccdc9b83 Bug 1627362 - Fix WR codepath. r=botond
This patch just ensures the changes in the previous patches get applied
to the WR codepath, and is sufficient to make all the remaining sticky
tests pass on Android+WR.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 21:05:26 +00:00
Kartikaya Gupta
bbdeafdcdb Bug 1627362 - Properly support items stuck to both bottom and top. r=botond
The semantics of sticky items are somewhat different from the semantics of
fixed items. For fixed items, if an item is fixed to eTop or eBottom or
eTopBottom, it is *always* fixed to those sides. For sticky items, however,
the sides actively stuck to are dependent on the scroll position. So we need
a mechanism to dynamically figure out which sides are stuck, and use those
sides when computing the fixed margins to apply. This patch implements that
by modifying the IsStuckToRootContentAtBottom method into a
SidesStuckToRootContent method.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 21:05:12 +00:00
Kartikaya Gupta
952f78e233 Bug 1627362 - Rewrite IsStuckAtBottom to be simpler and clearer. r=botond
I couldn't understand what it was doing before, but conceptually it should
be pretty simple.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 21:04:56 +00:00
Kartikaya Gupta
62383abdc6 Bug 1627362 - Allow calling fixed/sticky helpers with (Fixed|Sticky)PositionInfo. r=botond
This sets us up to be able to use these helper methods on WR sampling codepath.

Depends on D70907

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

--HG--
extra : moz-landing-system : lando
2020-04-15 19:15:44 +00:00
Kartikaya Gupta
41034c6ca7 Bug 1627362 - Have (Fixed|Sticky)PositionInfo take a HTTN in the constructor. r=botond
This will make future patches simpler, as we can now create these info objects
more easily for the non-WR codepath as well.

Depends on D70906

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

--HG--
extra : moz-landing-system : lando
2020-04-15 19:14:12 +00:00
Kartikaya Gupta
483cd1925d Bug 1627362 - Remove the tree lock requirement for a couple of functions. r=botond
We can use the map lock to do a lookup in mApzcMap, instead of requiring the
tree lock to call GetTargetAPZC.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 19:11:31 +00:00
Anny Gakhokidze
7c0eb4aad6 Bug 1594529 - Create LoadInfo for subdocuments directly in parent process with DocumentChannel. r=mattwoodrow,nika
Currently, with Fission enabled we are not able to create a proper LoadInfo
object when doing a subdocument load because we do not have access to a loading
context if the load is happening inside of an OOP frame. To solve this problem,
we can create LoadInfo object from scratch in the parent process where we have
all of the required information.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 18:53:06 +00:00
Stefan Hindli
1b55e83f7a Backed out 2 changesets (bug 1594529) for causing perma wpt2 with ValueError: badly formed hexadecimal UUID string in /cookies/samesite/iframe-reload.https.html CLOSED TREE
Backed out changeset fbf55a44d7fb (bug 1594529)
Backed out changeset 4ba9a230586a (bug 1594529)
2020-04-15 08:41:10 +03:00
sotaro
5e373d876a Bug 1626142 - Fix canvas handling during resuming on Android r=jnicol
CanvasClientSharedSurface did not handle a case that CanvasClientSharedSurface was re-created, but GLScreenBuffer was not re-created. And RenderCompositorEGL::Pause() detaches all SurfaceTesxtures, but RenderAndroidSurfaceTextureHostOGL did not handle it.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 14:07:30 +00:00
Bob Owen
c640645fb9 Bug 1618868 Part 3: Fix failure test race in CanvasEventRingBuffer::ReturnRead. r=jrmuizel
This also adds checks for the other side closing during the ReturnRead and
ReturnWrite loops.

Depends on D70336

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

--HG--
extra : moz-landing-system : lando
2020-04-14 17:53:15 +00:00
Bob Owen
00d118c48c Bug 1618868 Part 2: Make counts and states in CanvasEventRingBuffer footers SequentiallyConsistent. r=jrmuizel
This fixes an issue with the AboutToWait check. It is possible that this could
be done without this, but while there might be a very slight performance hit, it
seems to be smaller than the general noise in the tests.

Depends on D70335

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

--HG--
extra : moz-landing-system : lando
2020-04-14 17:52:57 +00:00
Bob Owen
7bd8cb606c Bug 1618868 Part 1: Call CanvasTranslators() before CanvasThreadHolder::ReleaseOnCompositorThread to avoid race. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D70335

--HG--
extra : moz-landing-system : lando
2020-04-09 22:28:49 +00:00
Anny Gakhokidze
1fc287f151 Bug 1594529 - Create LoadInfo for subdocuments directly in parent process with DocumentChannel. r=mattwoodrow,nika
Currently, with Fission enabled we are not able to create a proper LoadInfo
object when doing a subdocument load because we do not have access to a loading
context if the load is happening inside of an OOP frame. To solve this problem,
we can create LoadInfo object from scratch in the parent process where we have
all of the required information.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 23:00:43 +00:00
Timothy Nikkel
59bd6d0dee Bug 1624532. Handle incomplete masks on svg content properly with webrender. r=mstange,jrmuizel
The basic problem here for the page is that we should draw an svg element as if it has no mask specified if the specified mask is display: none. (For html elements in the same situation we should not draw the html element at all.)

The fix is to treat the return values of PaintMaskSurface (which come through nsSVGIntegrationUtils::PaintMask and nsDisplayMasksAndClipPaths::PaintMask) in WebRenderCommandBuilder::BuildWrMaskImage the same way as in CreateAndPaintMaskSurface.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 17:08:52 +00:00
Kartikaya Gupta
094d451696 Bug 1622360 - Downgrade pageRootScs from RenderRootArray. r=jrmuizel
Depends on D70603

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:08:19 +00:00
Kartikaya Gupta
68b8339258 Bug 1622360 - Remove mRootStackingContexts. r=jrmuizel
This isn't used any more; the only getter function is not called from
anywhere.

Depends on D70602

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:08:16 +00:00
Kartikaya Gupta
5fe779b3a8 Bug 1622360 - Downgrade builder dump index from RenderRootArray. r=jrmuizel
Depends on D70601

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:07:08 +00:00
Kartikaya Gupta
c65ae0becc Bug 1622360 - Downgrade clip manager from RenderRootArray. r=jrmuizel
Depends on D70600

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:06:56 +00:00
Kartikaya Gupta
720b1647d8 Bug 1622360 - Downgrade font key structures from RenderRootArrays. r=jrmuizel
Depends on D70599

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:06:23 +00:00
Kartikaya Gupta
63885a985a Bug 1622360 - Downgrade mParentCommands from RenderRootArray. r=jrmuizel
Depends on D70598

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:06:10 +00:00
Kartikaya Gupta
bd414399ff Bug 1622360 - Remove leftover WebRenderScrollDataCollection decl. r=jrmuizel
The implementation and uses of this were removed previously.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:05:43 +00:00
Kartikaya Gupta
6be377b59b Bug 1566599 - Add a test for the ForceEmptyHitRegion flag. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D70397

--HG--
extra : moz-landing-system : lando
2020-04-14 00:16:41 +00:00
Kartikaya Gupta
8699a4459c Bug 1566599 - Ensure we still check the flags on the node for the NULL_SCROLL_ID case. r=botond
For the case where we got a hit-result with a NULL_SCROLL_ID, we wouldn't
get a node, and would fall back to the root APZC for the layers id. But we
should actually still find the HTTN so that we can check the override flags.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:44:38 +00:00
Kartikaya Gupta
7aa5fb4be6 Bug 1566599 - Ensure EventRegionOverride flags don't end up on the HTTNs for reflayers. r=botond
We need to propagate the flags from the reflayer into the descendant subtree,
but remove the flag from the HTTN corresponding to the reflayer itself. See
comments in the patch for why.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:11:09 +00:00
Kartikaya Gupta
dddcd82d24 Bug 1566599 - Add support for ForceEmptyHitRegion on the WR hit-test. r=botond
This is a "naive" implementation that will be refined in the next couple of
patches.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:43:35 +00:00
Kartikaya Gupta
442f54f533 Bug 1566599 - Have the WR hit-test return all results to the caller. r=botond
No functional changes here, just plumbing to allow the caller to
access all the results instead of just the one picked out by
bindings.rs.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:43:18 +00:00
Timothy Nikkel
b89bb47353 Bug 1628988. Don't apply ImgDrawResult::NOT_READY in PaintMaskSurface. r=mstange
PaintMaskSurface shouldn't be applying ImgDrawResult::NOT_READY when we don't have a frame and the mask image hasn't been resolved. ImgDrawResult is only about drawing images, not about waiting for external resources to resolve or frames to get constructed. The only purpose of tracking ImgDrawResult's in painting code is to know which frames we need to invalidate because their rendering might change if we sync decode images during a Draw call. Applying NOT_READY here means we invalidate for every paint with the sync decode images flag (ie reftest paints), and it never changes from NOT_READY. This bites the reftest for this bug 1624532.

To fix it, instead of "overloading" the ImgDrawResult we return a bool to indicate the mask is missing or incomplete.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 20:08:05 +00:00
Roger Zanoni
17bfebd536 Bug 1626777 - Remove redundant return statement in WebRenderBridgeParent. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D70483

--HG--
extra : moz-landing-system : lando
2020-04-10 08:04:43 +00:00
James Willcox
3ed4ef71c1 Bug 1627737 - Add mTargetIsRoot to APZEventResult r=botond
This allows us to determine if the event was handled in the
toplevel frame or not.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 16:13:50 +00:00
Kartikaya Gupta
6f24092aae Bug 1424714 - Prevent the displayport clip from clipping sticky items. r=mstange
The displayport clip that is applied to sticky items from the enclosing
scrollframe can cause sticky items to checkerboard even when they might
reasonably be left visible. This is because the displayport clip moves as
the enclosing scrollframe is scrolled, but sticky items may remain fixed
during such scrolling. The displayport clip can therefore clip out sticky
items even if they are "stuck" and should be user-visible.

This patch sets a flag to identify when a sticky item is being clipped by
the displayport clip, and ensures that it doesn't actually get clipped. In
the case where other clips are being applied to the sticky item, we leave the
clips unaffected. This allows for other enclosing elements to clip the sticky
item as before.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 04:59:14 +00:00
Edouard Oger
f8baae0352 Bug 1627444 p3 - Replace ByteSize by ByteSizeLong. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D69712

--HG--
extra : moz-landing-system : lando
2020-04-07 15:26:26 +00:00
Edouard Oger
8442a065cf Bug 1627444 p2 - Regenerate protobuf classes r=lina
Differential Revision: https://phabricator.services.mozilla.com/D69707

--HG--
extra : moz-landing-system : lando
2020-04-07 18:05:56 +00:00
Andreas Farre
25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Andreas Farre
80a8c9ff06 Bug 1620594 - Part 4: Remove SetEventTargetForActor with SystemGroup target. r=nika
Depends on D67633

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:54 +00:00
Andreas Farre
36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Andreas Farre
63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
Kartikaya Gupta
00c078e5f2 Bug 1622360 - Remove WebRenderScrollDataCollection. r=jrmuizel
This basically allowed managing a bunch of scroll data things in parallel
for all the render roots which we don't need anymore.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 20:45:21 +00:00
Kartikaya Gupta
cee04b337d Bug 1622360 - Remove the sub-builder machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69844

--HG--
extra : moz-landing-system : lando
2020-04-06 20:45:14 +00:00
Kartikaya Gupta
134d04f038 Bug 1622360 - Remove the code that deals with render root rects. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69843

--HG--
extra : moz-landing-system : lando
2020-04-06 20:44:58 +00:00
Kartikaya Gupta
1c73319b51 Bug 1622360 - Downgrade mPendingScrollUpdates from RenderRootArray. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69842

--HG--
extra : moz-landing-system : lando
2020-04-06 20:44:46 +00:00
Dzmitry Malyshau
3021defc28 Bug 1602133 - WebGPU presentation r=jgilbert,webidl,smaug,aosmond
This change adds support for CanvasContext presenting WebGPU via CPU readback.
The presentation is handled mostly on GPU process side by managing a list of staging buffers
and copying the contents into a WR external image (backed by an external buffer).

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

--HG--
extra : moz-landing-system : lando
2020-04-06 22:29:18 +00:00
Cosmin Sabou
2f4d9af7d3 Backed out changeset bc6b2b003c6e (bug 1602133) for causing build bustages on CanvasRenderingContextHelper.cpp.
--HG--
extra : histedit_source : 917f3627a3e3f8dab0d806b69fc716bfd9f1d483
2020-04-06 23:46:51 +03:00