Commit Graph

37501 Commits

Author SHA1 Message Date
Glenn Watson
a9c83bb752 Bug 1623792 - Pt 5 - Determine no-op filters during scene building. r=nical
Previously, we would defer calculation of whether a filter was a
no-op until frame building. However, this complicates decisions
related to which clips apply to which surfaces.

Now, this decision is made during scene building. This makes things
more consistent during frame building, which we can take advantage
of in future. It also makes things like render target allocations
slightly more predictable.

Differential Revision: https://phabricator.services.mozilla.com/D82133
2020-07-05 20:23:22 +00:00
Jeff Muizelaar
1ccd29d935 Bug 1650662 - RELEASE_ASSERT that FT_Init_FreeType succeeds. r=lsalzman
I don't think we should bother trying to run without a working FreeType.

Differential Revision: https://phabricator.services.mozilla.com/D82298
2020-07-05 19:40:37 +00:00
Hiroyuki Ikezoe
4205879729 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Depends on D75731

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 11:45:01 +00:00
Hiroyuki Ikezoe
85030f4af6 Bug 1324591 - Jank if we are trying to composite area which is outside of the the partial prerender rect on non WebRender. r=botond,jrmuizel
Depends on D81481

Differential Revision: https://phabricator.services.mozilla.com/D75731
2020-07-05 11:44:18 +00:00
Hiroyuki Ikezoe
80fc56a28e Bug 1324591 - Add APZSampler::GetCompositionBounds to get the composition bounds for a given pair of LayersId and scrollId. r=botond
Depends on D75730

Differential Revision: https://phabricator.services.mozilla.com/D81481
2020-07-05 11:43:45 +00:00
Hiroyuki Ikezoe
ec49c6a9a8 Bug 1324591 - Inform the partial prerender rect, the overflowed SideBits, the scroll id of the nearest scrollable frame and its rectable to the compositor. r=botond
nsDisplayTransform doesn't have enough room to store the partial prerender rect
and the overflowed SideBits unfortunately (it will exceed 512 bytes limit [1]).
So we get the partial prerender rect and calculate the overflowed SideBits just
before we send transform animation information to the compositor.

[1] https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/layout/painting/nsDisplayList.cpp#7318

Depends on D81480

Differential Revision: https://phabricator.services.mozilla.com/D75730
2020-07-05 11:43:33 +00:00
Hiroyuki Ikezoe
1c1e6e4963 Bug 1324591 - Store the corresponding LayersId for each animation on the compositor. r=kats
Depends on D75727

Differential Revision: https://phabricator.services.mozilla.com/D75728
2020-07-05 11:42:55 +00:00
Brindusan Cristian
7f75410fd7 Backed out 9 changesets (bug 1324591) for linux build bustages on central on nsDisplayList.h.
Backed out changeset 75966ee1fe65 (bug 1324591)
Backed out changeset d6a01c6bc40e (bug 1324591)
Backed out changeset fef36ff2ea3d (bug 1324591)
Backed out changeset 4a4ae4bd95d1 (bug 1324591)
Backed out changeset 732804c83add (bug 1324591)
Backed out changeset 84657a3522fb (bug 1324591)
Backed out changeset e6c74ba41007 (bug 1324591)
Backed out changeset 8e6d4e9f5aa0 (bug 1324591)
Backed out changeset 6bc284863aff (bug 1324591)
2020-07-05 13:45:35 +03:00
Hiroyuki Ikezoe
92208a9c28 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 02:21:01 +00:00
Hiroyuki Ikezoe
c350cb04ad Bug 1324591 - Jank if we are trying to composite area which is outside of the the partial prerender rect on non WebRender. r=botond,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75731
2020-07-05 02:20:23 +00:00
Hiroyuki Ikezoe
efee5d73c6 Bug 1324591 - Add APZSampler::GetCompositionBounds to get the composition bounds for a given pair of LayersId and scrollId. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D81481
2020-07-05 02:19:45 +00:00
Hiroyuki Ikezoe
a32c79b20d Bug 1324591 - Inform the partial prerender rect, the overflowed SideBits, the scroll id of the nearest scrollable frame and its rectable to the compositor. r=botond
nsDisplayTransform doesn't have enough room to store the partial prerender rect
and the overflowed SideBits unfortunately (it will exceed 512 bytes limit [1]).
So we get the partial prerender rect and calculate the overflowed SideBits just
before we send transform animation information to the compositor.

[1] https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/layout/painting/nsDisplayList.cpp#7318

Differential Revision: https://phabricator.services.mozilla.com/D75730
2020-07-05 02:19:38 +00:00
Hiroyuki Ikezoe
d37f48e250 Bug 1324591 - Store the corresponding LayersId for each animation on the compositor. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75728
2020-07-05 02:48:51 +00:00
Sylvestre Ledru
caf785c695 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D82178
2020-07-04 09:38:43 +00:00
Hiroyuki Ikezoe
3039d13ffc Bug 1650354 - Clear color animation properties in flush_pending_updates. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D82173
2020-07-04 05:21:53 +00:00
Hiroyuki Ikezoe
0bd87d77fc Bug 1552923 - Clear out the last animated value if a new animation with the same id arrived and sampled but didn't produce any animated value. r=kats
A reftest for this issue will be added in bug 1650351.

Differential Revision: https://phabricator.services.mozilla.com/D82172
2020-07-03 21:42:06 +00:00
Kartikaya Gupta
bc6c7c9f34 Bug 1650081 - Use scrollbar-width:none instead of overflow:hidden to hide scrollbars. r=botond
Instead of using overflow:hidden on the body to hide the scrollbar, this
patch sets scrollbar-width:none on the html element. In some cases
overflow:hidden is set on non-root scrollers (i.e. div elements); in those
cases it is replaced by overflow:scroll;scrollbar-width:none to get an
equivalent effect.

One test had a pre-existing visible scrollbar on a nested scrollframe, but
which started failing with a small fuzz difference. I left the scrollbar as-is
and added an annotation to the reftest.list file.

Note that this only updates the tests that use reftest-async-scroll as those
were the cases that were easily detectable, and causing problems with the
apz.allow_zooming=true pref.

Differential Revision: https://phabricator.services.mozilla.com/D82032
2020-07-03 19:50:11 +00:00
Mihai Alexandru Michis
fb3212f7cc Backed out changeset bd58cdafe3c9 (bug 1650081) for causing failures in offscreen-prerendered-active-opacity.html
CLOSED TREE
2020-07-03 22:30:50 +03:00
Kartikaya Gupta
3bc44b4a60 Bug 1650081 - Use scrollbar-width:none instead of overflow:hidden to hide scrollbars. r=botond
Instead of using overflow:hidden on the body to hide the scrollbar, this
patch sets scrollbar-width:none on the html element. In some cases
overflow:hidden is set on non-root scrollers (i.e. div elements); in those
cases it is replaced by overflow:scroll;scrollbar-width:none to get an
equivalent effect.

One test had a pre-existing visible scrollbar on a nested scrollframe, but
which started failing with a small fuzz difference. I left the scrollbar as-is
and added an annotation to the reftest.list file.

Note that this only updates the tests that use reftest-async-scroll as those
were the cases that were easily detectable, and causing problems with the
apz.allow_zooming=true pref.

Differential Revision: https://phabricator.services.mozilla.com/D82032
2020-07-03 16:07:51 +00:00
Martin Stransky
533d0807f0 Bug 1619523 [Linux] Remove Wayland check at gfxPlatformGtk::UseDMABufVideoTextures(), make VA-API decoding possible on X11 r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D82183
2020-07-03 12:23:43 +00:00
Martin Stransky
1c07029298 Bug 1650113 [Linux] Use DMABufTextures only when Wayland support is build, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D82177
2020-07-03 12:59:53 +00:00
Martin Stransky
276e0a676b Bug 1619523 [Linux] Remove Wayland check at gfxPlatformGtk::UseHardwareVideoDecoding(), make VA-API decoding possible on X11 r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D82174
2020-07-03 11:27:56 +00:00
Jonathan Kew
0cfcdeb5d0 Bug 1648354 - Handle the fact that ToPtr() may return null in the child process. r=jwatt
Normally, if IsNull() is false, we'd expect ToPtr() to return a valid pointer,
but for code that may run on a stylo thread in the child process this is not
necessarily true: if resolving the pointer requires accessing a new shared-mem
block, we can't make that IPC call from the stylo thread. So in this case, we
let ToPtr() return null, and the caller needs to handle this safely.

Differential Revision: https://phabricator.services.mozilla.com/D81242
2020-07-03 09:02:54 +00:00
Edgar Chen
dc0bf3f975 Bug 1648630 - Part 3: Propagate layers id to touch event properly for Fission; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D81869
2020-07-03 07:45:35 +00:00
Jean-Yves Avenard
e1424a9e65 Bug 1649977 - Use a nsThread for the VRService. r=kip
The logic was apparently initially copied from the compositor thread which too got migrated to nsThread in bug 1634253, so we re-use that same logic again.

This allows to remove all use of the Google's MessageLoop.

Differential Revision: https://phabricator.services.mozilla.com/D81974
2020-07-03 02:52:05 +00:00
Jean-Yves Avenard
8fd158d479 Bug 1649684 - Use the current nsISerialEventTarget with the various process hosts. r=nika
In all those cases, the current nsISerialEventTarget is either the main thread or the MessageChannel's nsISerialEventTarget (since bug 1634846)

Differential Revision: https://phabricator.services.mozilla.com/D81966
2020-07-02 22:59:24 +00:00
Jeff Gilbert
017fc801d8 Bug 1647167 - Run pre/post transaction triggers in BasicCanvasLayer::Paint. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D82116
2020-07-02 22:55:48 +00:00
Jeff Muizelaar
510bcf6329 Bug 1649040. Properly set the transform on the clipped surface. r=mstange
This changes DrawTargetWrapAndRecord::CreateClippedDrawTarget to
properly set the transform on the newly created DrawTarget
to match DrawTargetRecording::CreateClippedDrawTarget.

More interestingly, it adds a print reftest that
ensures that this code is actually excerised.

Differential Revision: https://phabricator.services.mozilla.com/D82114
2020-07-02 22:17:51 +00:00
Imanol Fernandez
dcdc973db7 Bug 1374571 - Ensure EGL Library is initialized when calling CreateSurfaceFromNativeWindow. r=jgilbert
There are some code paths where CreateSurfaceFromNativeWindow can be called without the GLLibraryEGL::EnsureInitialized check

Differential Revision: https://phabricator.services.mozilla.com/D81990
2020-07-02 18:07:10 +00:00
Molly Howell
ea8a8a9f90 Bug 1644954 - Improve DLL loading. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D81387
2020-07-02 17:48:19 +00:00
sotaro
ce3a41744b Bug 1648411 - Add AHardwareBuffer layer buffer support on android r=jnicol
AHardwareBuffer is supported since Android O(APIVersion 26). Implementation of AndroidHardwareBufferTextureData referred AndroidNativeWindowTextureData. Implementation of AndroidHardwareBufferTextureHost referred obsoleted GrallocTextureHost.

android fence is not supported yet.

Differential Revision: https://phabricator.services.mozilla.com/D81808
2020-07-02 13:43:19 +00:00
Martin Stransky
2ba9319525 Bug 1640048 - [X11] Initial EGL runtime support, r=jgilbert,rmader
Patch by Robert Mader [:rmader]

This enables support for EGL on X11, toggled by setting the
MOZ_X11_EGL env variable. It allows running the Webrender
and OpenGL compositors basically like we do with GLX by default.

Note that that there are several things missing:

- no pixmap sharing support (not clear if we want/need it)
- it still uses GLX for several things like finding the X11 visual, VSync and glxtest.

It includes some cleanups, mostly in order to decouple the X11
and Wayland implementations a bit more.

Differential Revision: https://phabricator.services.mozilla.com/D76417
2020-07-02 13:50:41 +00:00
Glenn Watson
a2c3c4d10b Bug 1647940 - Fix panic when compositor video surface is not requested. r=nical
If an image is promoted to a compositor surface, but subsequently
clipped (by invalid clip rect) then we skip requesting the image
but still try to resolve the surface when building batches.

This patch reorders the primitive pass so that any decisions about
dropping a primitive from the visible list are made before the
prim dependencies (and compositor surfaces) are updated.

Differential Revision: https://phabricator.services.mozilla.com/D81928
2020-07-02 09:16:17 +00:00
Noemi Erli
b13f2bcb47 Backed out 7 changesets (bug 1627075) for causing @nsZipArchive crashes CLOSED TREE
Backed out changeset 9705b2759d45 (bug 1627075)
Backed out changeset 699212a443c3 (bug 1627075)
Backed out changeset 7ae4df10749c (bug 1627075)
Backed out changeset ece9a4223349 (bug 1627075)
Backed out changeset 6c4eedaa0d04 (bug 1627075)
Backed out changeset f5106898239f (bug 1627075)
Backed out changeset b6029c7c0016 (bug 1627075)
2020-07-02 14:05:53 +03:00
Doug Thayer
3742aac030 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-02 02:51:41 +00:00
Jeff Gilbert
335a0af676 Bug 1647491 - Hold ref to previous webgl frontbuffer while in-flight. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D81921
2020-07-02 01:45:36 +00:00
Jean-Yves Avenard
9356971435 Bug 1647112 - P2. Remove static method. r=mattwoodrow
Allows to remove the dance around the compositor thread just to perform the assertion.
The use of an in-line lambda avoid all ambiguity on which thread this is called.

Differential Revision: https://phabricator.services.mozilla.com/D80635
2020-07-02 00:29:53 +00:00
Jean-Yves Avenard
28c6755d49 Bug 1647112 - P1. Make the canvas thread use BackgroundTaskQueue. r=KrisWright,jgilbert,andi
Some headers cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D80597
2020-07-01 17:45:36 +00:00
Jean-Yves Avenard
87ab775e09 Bug 1647628 - Make ImageBridgeChild use a background taskqueue. r=KrisWright,andi
Differential Revision: https://phabricator.services.mozilla.com/D80599
2020-07-02 00:27:47 +00:00
Jean-Yves Avenard
8fc6e95f6c Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow,andi
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-07-02 00:26:46 +00:00
Jim Blandy
1f4b5cd074 Bug 1649861: Turn of RendererOptions::clear_caches_with_quads under SWGL. r=lsalzman
The `clear_caches_with_quads` flags is meant to work around a bug in some
drivers' scissored clears, but its implementation uses the `GL_ALWAYS` depth
comparison function, which SWGL doesn't support.

SWGL does scissored clears very well, so simply turning this workaround off on
SWGL avoids the problem and gets good results.

Of course we could just make SWGL support `GL_ALWAYS`, but that would be kind of
annoying, since it basically disables depth checks altogether, and we want to
use entirely different paths when depth checks aren't needed.

Differential Revision: https://phabricator.services.mozilla.com/D81918
2020-07-01 22:27:56 +00:00
Jim Blandy
8862fb303a Bug 1649840: Adapt wrench to SWGL API changes. r=lsalzman
swgl::Context::init_default_framebuffer takes two new arguments, for providing a
frame buffer owned by something else. swgl::Context::get_color_buffer returns an
extra value, describing the stride of the buffer in addition to the width.

Differential Revision: https://phabricator.services.mozilla.com/D81896
2020-07-01 22:25:46 +00:00
Mihai Alexandru Michis
bab20702a8 Backed out 6 changesets (bug 1627075) for causing failures regarding startupcache.
CLOSED TREE

Backed out changeset cf23b456ba12 (bug 1627075)
Backed out changeset b07887474f51 (bug 1627075)
Backed out changeset 65c0e6790a33 (bug 1627075)
Backed out changeset 6cd31f17a931 (bug 1627075)
Backed out changeset 0f0d1bd2a8ac (bug 1627075)
Backed out changeset 763a5a7b43a0 (bug 1627075)
2020-07-01 22:16:28 +03:00
Doug Thayer
ab4b703a53 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-01 17:09:53 +00:00
Valentin Gosu
f8823e06c1 Bug 1649721 - Gate mUseWebGLDmabufBackend on MOZ_WAYLAND r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D81834
2020-07-01 16:15:55 +00:00
Jon Bauman
a415128250 Bug 1649312 - No derogatory language: Remove references to grandfather in comments r=njn,zbraniecki,keeler,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D81628
2020-07-01 15:23:26 +00:00
Martin Stransky
1a8c767e6f Bug 1649120 [Linux] Rename Wayland/DMABuf in gfx code, r=sotaro
We change DMABuf config keys from Wayland specific to universal ones as they can be used in both X11 and Wayland backends.

Depends on D81515

Differential Revision: https://phabricator.services.mozilla.com/D81516
2020-07-01 11:22:42 +00:00
Martin Stransky
7007b75677 Bug 1649120 [Linux] Rename Wayland/DMABuf preferences at gfxPlatform, r=jhorak
Depends on D81513

Differential Revision: https://phabricator.services.mozilla.com/D81514
2020-07-01 11:22:27 +00:00
Simon Giesecke
e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00