Commit Graph

36750 Commits

Author SHA1 Message Date
Jim Blandy
2cf9bb66be Bug 1631168: Address GCC warnings in gfx/wr/swgl/src/vector_type.h. r=lsalzman
Provide an explicit copy constructor for the GCC `VectorType` polyfill. Since
`VectorType` has an assignment operator, GCC is uncomfortable faking a copy
constructor, so we have to provide one.

Make `VectorType` default constructor actually initialize the elements. When we
have a GLSL `if` whose condition varies from fragment to fragment, and whose
alternatives either assign to a variable or discard the fragment, we compile the
assignment to an `if_then_else` call that preserves the old elements for
fragments not taking the assignment's path. But if this is the initializing
assignment, the 'old value' operand to that `if_then_else` is uninitialized. We
could make the translator smarter about this, and have it not use predicated
assignment in such cases, but this fix is fine for now.

Make `VectorType::wrap` take its argument by const reference, to avoid weird ABI
'notes'.

Differential Revision: https://phabricator.services.mozilla.com/D71444
2020-04-20 19:41:42 +00:00
Jim Blandy
f2b1395510 Bug 1631168: Address wrench build warnings with 'software' feature enabled. r=lsalzman
When the `software` feature is enabled, a clause gets added to two `match`
statements, causing Rust to complain that another `match` clause is unreachable.
This patch makes the other match clause conditional on the absence of the
`software` feature.

Differential Revision: https://phabricator.services.mozilla.com/D71443
2020-04-18 10:19:57 +00:00
Jim Blandy
6a36b46f0d Bug 1631028: Add usage comments to gfx/wr/wrench/script/headless.py. DONTBUILD r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D71367
2020-04-20 13:45:18 +00:00
Lee Salzman
c0c6c9455a Bug 1631156 - make glsl-to-cxx generate proper bit patterns for bools. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71436
2020-04-20 15:45:39 +00:00
Nicolas Silva
38fe2ecf49 Bug 1631293 - Clear the blob image dirty rect after preparing blob rsaterization requests. r=jrmuizel
This line was accidentally removed here 100387bece (l5.486)

Differential Revision: https://phabricator.services.mozilla.com/D71561
2020-04-20 14:00:51 +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
Arash Fotouhi
498ff8cbea Bug 1629426 - Remove redundant return statement. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71495
2020-04-20 03:00:12 +00:00
Jeff Muizelaar
5b6964a339 Bug 1631312. Move the check for UseWebRenderDCompWin(). r=sotaro
Bug 1630629 moved the check UseWebRenderDCompWin before it had been
initialized. This moves it below so that DirectComposition isn't
disabled everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D71498
2020-04-20 06:11:52 +00:00
sotaro
c64e7f13d2 Bug 1611372 - Invalidate WebRender frame on nsWindow::OnExposeEvent() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D71139
2020-04-17 17:27:37 +00:00
Lee Salzman
cb7f18181e Bug 1627689 - check for valid surfaces in DrawTargetCairo::DrawSurfaceWithShadow. r=jrmuizel
This just duplicates some error checking we already do in DrawSurface to this case.

Differential Revision: https://phabricator.services.mozilla.com/D71209
2020-04-17 22:17:18 +00:00
Lee Salzman
bff5086efb Bug 1631070 - silence unused parameter warnings in SWGL. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D71393
2020-04-17 20:13:01 +00:00
Bert Peers
83c81ac68c Bug 1630389 - Enable WaitForVBlank by default on Windows 10 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71097
2020-04-17 17:30:36 +00:00
Lee Salzman
808ca7fb37 Bug 1630142 - implement linear filtering for SWGL glBlitFramebuffer. r=jimb
This provides an implementation of linear filtering via the linear_blit
routine. That required factoring out textureLinear helper functions and
reusing them to do the actual filtering of the source texture.

Some collateral cleanups involved changing IntRect to use a start/end
format instead of origin/size, cleaner ways of getting offset texture
sampler pointers, and fixing clamping of linear filter coordinates.

Differential Revision: https://phabricator.services.mozilla.com/D70968
2020-04-17 16:51:27 +00:00
Andrew Osmond
bb9d882e66 Bug 1627739 - Do not delay FrameTexturesUpdated notifications for empty updates. r=kvark
The FrameTexturesUpdated event is intended to be issued when any
necessary texture cache updates have been completed for the current
frame. Originally we would simply check if the pending_texture_updates
vector in Renderer is empty. However the updates themselves could be
nops, and not trigger a timely frame render to occur, causing the
notifications to be delayed indefinitely. Now we track if there are
actually any pending specifically texture cache updates and only defer
the notification if true.

A consequence of deferring the notification indefinitely was revealed
when animating images just outside the current view. We would not
release the buffers for recycling even though we had no reason to hold
onto them. This could cause the image decoder to allocate new buffers
while the old buffers would not get released. It was not a true memory
leak because as soon as a frame is rendered, it would release all of the
old buffers, but it could easily cause a out of memory crash to occur if
the user was not interacting with the browser while in this state.

Differential Revision: https://phabricator.services.mozilla.com/D70770
2020-04-14 16:53:45 +00:00
Jeff Muizelaar
ac7ae315e5 Bug 1630629. Block WebRender on Intel if no DComp. r=aosmond
This moves the DirectComposition configuration code before
the WebRender configuration code so that we can depend
on the results to decide whether to user WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D71213
2020-04-17 01:43:05 +00:00
Coroiu Cristina
43be71277d Backed out 2 changesets (bug 1625500) for multiple failures on a CLOSED TREE
Backed out changeset 7d80233bcfcd (bug 1625500)
Backed out changeset 0a35b13dfcde (bug 1625500)
2020-04-17 15:36:05 +03:00
Gijs Kruitbosch
cc39a339a0 Bug 1625500 - fix use of .then(x, x) in the tree, r=marionette-reviewers,Standard8,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D68614
2020-04-17 11:41:49 +00:00
Bob Owen
f03c78362b Bug 1630304: Remove invalid assertion in CanvasThreadHolder::StaticRelease. r=mattwoodrow
TaskQueues hold onto their nsIEventTarget (in this case mCanvasWorkers) until
after they resolve their shutdown promise, which is what causes
CanvasThreadHolder::StaticRelease to be submitted to the compositor thread.
So this assertion can't be guaranteed.

Differential Revision: https://phabricator.services.mozilla.com/D71176
2020-04-17 04:56:35 +00:00
Dzmitry Malyshau
1240a7a135 Bug 1629776 - Handle WR case of an empty inner transformed rectangle r=gw
Differential Revision: https://phabricator.services.mozilla.com/D71229
2020-04-16 23:20:48 +00:00
Andreea Pavel
343b5d0156 Backed out changeset 923c7f562468 (bug 1630629) because phabricator version is not the same as one on try on a CLOSED TREE 2020-04-17 02:39:26 +03:00
Jeff Muizelaar
9bc49efb81 Bug 1630629. Block WebRender on Intel if no DComp. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D71213
2020-04-16 19:45:57 +00:00
Daosheng Mu
dd93d56fc0 Bug 1630739 - Invert Quest and Focus Plus controller rotation matrix for remapping. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D71215
2020-04-16 21:36:05 +00:00
Imanol Fernandez
a33b99b121 Bug 1630512 - Initialize VRDisplayClient api mode to WebVR r=kip,daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D71178
2020-04-16 21:38:57 +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
Jeff Muizelaar
50c4715de4 Bug 1630371 - Disable DirectComposition when we have a scaled resolution and no hardware stretching. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D71089
2020-04-16 14:54:17 +00:00
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
Lee Salzman
cef6b8c8e7 Bug 1630481 - make Wrench force external BGRA8 images to known format to avoid needing swizzles. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D71134
2020-04-16 15:13:03 +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
Glenn Watson
f276147e7f Bug 1630480 - Update gleam GL bindings to 0.11.0 r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D71133

--HG--
extra : moz-landing-system : lando
2020-04-16 02:13:31 +00:00
Arthur Iakab
3928665a70 Backed out changeset af41b9549456 (bug 1630389) for causing mass Windows failures.
CLOSED TREE
2020-04-16 03:36:36 +03:00
Imanol Fernandez
e3dd20241c Bug 1630290 - Update VRManager VRLayer instead of recreating it. r=daoshengmu,kip
Differential Revision: https://phabricator.services.mozilla.com/D71064

--HG--
extra : moz-landing-system : lando
2020-04-15 21:59:44 +00:00
Bert Peers
7c32464a6c Bug 1630389 - Enable WaitForVBlank by default on Windows 10 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71097

--HG--
extra : moz-landing-system : lando
2020-04-15 22:00:17 +00:00
Daosheng Mu
eaec8a64c7 Bug 1630159 - Revert Oculus Quest and Focus Plus controller matrix to match WebVR. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D70979

--HG--
extra : moz-landing-system : lando
2020-04-15 21:56:50 +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
Lee Salzman
728df4e3e8 Bug 1630370 - ignore mipmap allocation in SWGL. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71090

--HG--
extra : moz-landing-system : lando
2020-04-15 19:15:26 +00:00
Jeff Muizelaar
7158ea87e7 Bug 1630279 - Disable the disabling of DComp so we get more testing. r=aosmond
This is in anticipation of having a looser condition for enabling
DComp. Until that code is ready we might as well get more testing.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 17:30:56 +00:00
Jonathan Kew
230f11b26b Bug 1629787 - Initialize font metrics via harfbuzz API rather than reading tables directly, so that variations are respected. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D71029

--HG--
extra : moz-landing-system : lando
2020-04-15 14:14:55 +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
Stefan Hindli
15cb1192a5 Backed out changeset 887f1769a2c6 (bug 1609446) for causing bc permafails in browser/base/content/test/webextensions/browser_permissions_installTrigger.js CLOSED TREE 2020-04-15 08:20:48 +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
Emilio Cobos Álvarez
59de159bd9 Bug 1609446 - Make default window-constraints always show the content. r=mats,mstange
This code is used to determine the sizes of the top-level windows. However the
code doesn't cause quite desirable behavior (see the bug, and comment 15).

This patch does two things:

 * Unifies the html / xul code-paths. This shouldn't change behavior (because
   GetXULMinSize returns the fixed min-* property if present anyways), but
   makes the patch a bit simpler.

 * Makes the min-width of the XUL window be the pref size instead of the
   min-size (for the cases where you have no explicit min-width). This looks a
   bit counter intuitive, but it's the only way to guarantee that the content
   will be shown. This matches the sizing algorithm that dialogs use by default
   (via calling window.sizeToContent()), while allowing to undersize the window
   via a fixed min-width property.

This in turn makes sizeToContent() work "by default" on XUL windows, avoiding
having to make JS listen to everything that possibly could change the layout of
the document (like resolution changes).

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

--HG--
extra : moz-landing-system : lando
2020-04-15 01:44:25 +00:00
Dzmitry Malyshau
dee044c7f2 Bug 1629738 - Keep WebGPU pipeline layouts alive r=jgilbert
We need to access the contents of pipeline layouts on CPU
when we are recording commands. This PR adds refcounting to them
and improves the destruction code path to happen once all references are gone.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 21:51:45 +00:00
Dzmitry Malyshau
97fcffa123 Bug 1629896 - Fix WebGPU vertex format values r=jgilbert
it wasn't matching webgpu-native or the WebIDL

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

--HG--
extra : moz-landing-system : lando
2020-04-14 21:21:21 +00:00
Jamie Nicol
845c501566 Bug 1629835 - Ensure PBO upload strides are a multiple of 64 pixels on adreno r=kvark
Previously we were using 256 bytes (which happens to be equal to 64
pixels for RGBA8 textures). A recent change to the GPU Cache uncovered
the fact that the requirement is actually 64 pixels, eg 1024 bytes for
RGBAF32 textures.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 17:38:03 +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
Dzmitry Malyshau
86ff5eeab6 Bug 1629739 - Fix WebGPU buffer unmap warning r=jgilbert
it was a bogus warning that erroneously fire when Gecko flushed mapped contents

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

--HG--
extra : moz-landing-system : lando
2020-04-14 21:09:17 +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
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
Glenn Watson
a6cc45031e Bug 1629724 - Improve the GC strategy of the render target pool. r=nical
Only drop targets from the render target pool when the size of
the pool is larger than an arbitrary threshold (this is 32 MB
for now), _and_ the render target hasn't been used in the last
60 frames of rendering.

This reduces the number of allocation thrashing of textures in
the render target pool on most pages.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 10:59:55 +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
12ccbb9268 Bug 1629521 - Fix WR handling of items with both top and bottom sticky ranges. r=kvark
The WR code that computed the sticky_offset didn't properly combine the offsets
from the top- and bottom- sticky calculations if an item had both. This patch
fixes the calculation, which makes the remaining test failure (in the
configuration without any dynamic toolbar) pass.

Depends on D70679

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

--HG--
extra : moz-landing-system : lando
2020-04-13 18:39:07 +00:00
Kartikaya Gupta
d4434cef4f Bug 1628484 - Remove assertions that don't always hold. r=kvark
These assertions don't hold in some perfectly legitimate cases, such as when
items have both top and bottom sticky behaviours. The actual behaviour still
seems ok, so let's just drop the assertions.

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

--HG--
extra : moz-landing-system : lando
2020-04-10 19:03:17 +00:00
Dzmitry Malyshau
15435c2bf5 Bug 1622846 - Update WebGPU TextureDescriptor API r=jgilbert,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70762

--HG--
extra : moz-landing-system : lando
2020-04-14 12:52:03 +00:00
sotaro
7552fe3e1e Bug 1626822 - Add a way to enable WebRender without GPU process on Windows r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69771

--HG--
extra : moz-landing-system : lando
2020-04-14 03:27:12 +00:00
Glenn Watson
82cea19dee Bug 1629672 - Move prim_origin from instance to template. r=Bert,kvark
Previously, the prim origin needed to be stored in the prim
instance, to avoid picture cache invalidations. With support
for external scroll offset, this is no longer necessary.

This simplifies some of the code paths, and reduces the size
of primitive instances.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 01:04:05 +00:00
Glenn Watson
a4806e99d8 Bug 1629704 - Rotate vertex data textures per frame. r=Bert,kvark
On some (primarily older, integrated) drivers, we see significant
time in CPU stalls during updates to the vertex data textures.

As a short term fix, this patch creates an array of vertex data
textures, and rotates which set of them are in use each frame.

There are better long-term options (such as porting the GPU cache
scatter method, or perhaps using UBO/SSBOs here), but this is a
simple workaround for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 01:54:09 +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
Dzmitry Malyshau
964f4f889c Bug 1629605 - wgpu tracking fixes r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D70707

--HG--
extra : moz-landing-system : lando
2020-04-14 00:32:50 +00:00
Brindusan Cristian
2ad9b58e73 Backed out changeset d05ac327b65e (bug 1626822) for bustages at gfxPlatform.cpp. CLOSED TREE 2020-04-14 03:12:33 +03:00
Brindusan Cristian
090d7a16dc Backed out changeset 2c1a2c08592a (bug 1629605) for sm bustages. CLOSED TREE 2020-04-14 03:11:24 +03:00
sotaro
fb4859cf94 Bug 1626822 - Add a way to enable WebRender without GPU process on Windows r=jrmuizel
WebRender could be used when WebRender does not use ANGLE. And there is a case that we want to use WebRender with ANGLE for testing.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 23:55:08 +00:00
Glenn Watson
7eee44a592 Bug 1629693 - Enable GPU cache scatter path when running ANGLE. r=kvark
On some (mostly older, integrated) GPUs, the normal GPU texture cache
update path doesn't work well when running on ANGLE, causing CPU stalls
inside D3D and/or the GPU driver. To reduce the number of code paths we
have active that require testing, we will enable the GPU cache scatter
update path on all devices running with ANGLE. We want a better solution
long-term, but for now this is a significant performance improvement on
HD4600 era GPUs, and shouldn't hurt performance in a noticeable way on
other systems running under ANGLE.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 23:26:07 +00:00
Dzmitry Malyshau
64c80998c6 Bug 1629605 - wgpu tracking fixes r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D70707

--HG--
extra : moz-landing-system : lando
2020-04-13 22:46:31 +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
Dzmitry Malyshau
a3e5cb126b Bug 1617369 - Rustfmt pass over gfx/wgpu r=sylvestre
uses the default config with rustfmt-stable

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

--HG--
extra : moz-landing-system : lando
2020-04-13 17:26:41 +00:00
Dzmitry Malyshau
e8a60d2eab Bug 1624174 - Update wgpu to get the coordinate spaces right r=jgilbert
The updated wgpu has the coordinate space fixes.
Depends on

  - https://phabricator.services.mozilla.com/D70421
  - https://phabricator.services.mozilla.com/D70432
  - https://phabricator.services.mozilla.com/D70646

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

--HG--
rename : third_party/rust/rendy-descriptor/Cargo.toml => third_party/rust/gfx-descriptor/Cargo.toml
rename : third_party/rust/rendy-memory/Cargo.toml => third_party/rust/gfx-memory/Cargo.toml
rename : third_party/rust/rendy-memory/src/allocator/dynamic.rs => third_party/rust/gfx-memory/src/allocator/general.rs
rename : third_party/rust/rendy-memory/src/heaps/heap.rs => third_party/rust/gfx-memory/src/heaps/heap.rs
rename : third_party/rust/rendy-memory/src/utilization.rs => third_party/rust/gfx-memory/src/stats.rs
extra : moz-landing-system : lando
2020-04-13 13:42:15 +00:00
Glenn Watson
8c7529f5d0 Bug 1628901 - Fix panic caused by calling BeginDraw with empty dirty rect. r=sotaro
Previously, it was possible for a tile that had a valid scroll root
to have an empty valid (and dirty) rect due to the picture cache
clip rect, in some situations.

This could result in the tile not being tagged as off-screen, which
means it is added to the queue of tiles to be updated. On most
platforms this is benign, but the BeginDraw method of DirectComposition
fails if the dirty rect is empty.

This patch fixes the logic so that tiles that meet these conditions
are correctly tagged as not visible, and skipped from update queue.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 00:37:19 +00:00
Dzmitry Malyshau
540f1bea3f Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646

--HG--
rename : third_party/rust/parking_lot/src/mutex.rs => third_party/rust/parking_lot/src/fair_mutex.rs
extra : moz-landing-system : lando
2020-04-12 19:14:43 +00:00
Stefan Hindli
a8922cc7ff Backed out changeset 01cb2f16985e (bug 1629359) for linux x64 qr webgpu bustage
--HG--
extra : rebase_source : 29e879b00d66376a0508bc2df060fcf3f6028590
2020-04-12 22:09:15 +03:00
Dzmitry Malyshau
80f2377b05 Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646

--HG--
rename : third_party/rust/parking_lot/src/mutex.rs => third_party/rust/parking_lot/src/fair_mutex.rs
extra : moz-landing-system : lando
2020-04-12 16:25:25 +00:00
Dzmitry Malyshau
a1b1f0462a Bug 1620606 - Capture clip and primitive stores r=aosmond
this is purely infomational and doesn't get loaded back ever

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

--HG--
extra : moz-landing-system : lando
2020-04-09 11:10:49 +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