Commit Graph

37482 Commits

Author SHA1 Message Date
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
Nicolas Silva
36d0b0407a Bug 1648703 - Use a custom vector growth pattern in PrimitiveList. r=gw
This greatly reduces the number of vector reallocations happening while building primitive lists. On the difficult cases like youtube front page the reduction is a bit more than 50%, and more in other pages I tested. More importantly it dramatically reduces the amount of the most expensive of these reallocations which are when the vector is starting to get large.

Differential Revision: https://phabricator.services.mozilla.com/D81725
2020-07-01 07:01:18 +00:00
Nicolas Silva
957d144600 Bug 1648323 - Skip the primitive if its clip mask does not intersect it. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D81700
2020-07-01 07:01:18 +00:00
Bert Peers
0c6a81a2b3 Bug 1648879 - SWGL on Windows upside down r=lsalzman
Fix ODR violation: type of GLboolean must match gleam, else the unsafe{}
glue code will corrupt the parameters (and go out of bounds in
GetBooleanv). "Composite" was getting a garbage value for "flip".

Differential Revision: https://phabricator.services.mozilla.com/D81618
2020-06-30 00:09:39 +00:00
Gabriele Svelto
e8bade7e47 Bug 1647172 - Do not attempt to create a non-ES OpenGL context on Android r=jgilbert
This works around Android implementations that allow for non-ES contexts
to be created even though they don't work properly.

Differential Revision: https://phabricator.services.mozilla.com/D81666
2020-06-30 10:46:40 +00:00
Narcis Beleuzu
3700aab557 Backed out 7 changesets (bug 1634846, bug 1647628, bug 1649294, bug 1647112) for webgl-conf crashes. CLOSED TREE
Backed out changeset 4441d06e96c3 (bug 1647628)
Backed out changeset 4efaf32bc8f7 (bug 1647112)
Backed out changeset 2d24ad813039 (bug 1647112)
Backed out changeset fda262d73a13 (bug 1649294)
Backed out changeset 5863f9c5229f (bug 1634846)
Backed out changeset bca79526745d (bug 1634846)
Backed out changeset d539408a0048 (bug 1634846)
2020-06-30 09:50:00 +03:00
Jean-Yves Avenard
00688236a3 Bug 1647628 - Make ImageBridgeChild use a background taskqueue. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D80599
2020-06-24 01:38:30 +00:00
Jean-Yves Avenard
43bd79bd41 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-06-30 02:33:09 +00:00
Jean-Yves Avenard
135d109d8e Bug 1647112 - P1. Make the canvas thread use BackgroundTaskQueue. r=KrisWright
Some headers cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D80597
2020-06-30 02:33:02 +00:00
Jean-Yves Avenard
c251c5b2c7 Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow
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-06-30 02:50:38 +00:00
Timothy Nikkel
6d8a2d59b1 Bug 1648821. Limit the values we pass to SkConvolutionFilter1D::reserveAdditional so that SkTDArray::resizeStorageToAtLeast works correctly. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D81486
2020-06-30 02:24:20 +00:00
Glenn Watson
391f840b9f Bug 1623792 - Pt 4 - Retain tile caches in render backend. r=nical,Bert
Previously, tile cache instances were destroyed and recreated
each time a new scene was created, as they were embedded inside
the picture primitives. An elaborate but complicated system was
used to retain important state (such as native surfaces, primitive
dependencies) across new scenes.

This patch moves the tile cache instances to be stored inside the
render backend. It removes the previous code for retaining state
for each tile cache. Instead, tile caches are created / reused /
destroyed during `new_async_scene_ready`.

This removes quite a bit of complexity. More importantly, it is
another step towards being able to cache and retain state such
as primitive tile assignments and visibility state across both
new frames and scenes.

Differential Revision: https://phabricator.services.mozilla.com/D81487
2020-06-29 20:48:16 +00:00
sotaro
fa7166e309 Bug 1649119 - Add ANDROID_get_native_client_buffer support r=jgilbert
It is necessary for AHardwareBuffer usage.

Differential Revision: https://phabricator.services.mozilla.com/D81504
2020-06-30 00:31:12 +00:00
Markus Stange
f010294547 Bug 1647911 - Use text markers for payload presented markers. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D80946
2020-06-29 22:41:20 +00:00
Sylvestre Ledru
68e6f06c65 Bug 1649071 - Replace the DISALLOW_COPY_AND_ASSIGN & DISALLOW_EVIL_CONSTRUCTORS macros with = delete; r=froydnj
Generated with:
./mach static-analysis check --checks="-*, modernize-replace-disallow-copy-and-assign-macro" --fix -j 10 <file>
and
./mach clang-format -p <file>
(as clang-apply-replacement doesn't reformat the change)

(with ~/.mozbuild/clang-tools/clang-tidy/bin/clang-tidy pointing to clang-tidy 11)

Differential Revision: https://phabricator.services.mozilla.com/D81489
2020-06-29 14:37:56 +00:00
Bert Peers
b6fb32bf71 Bug 1648871 - debug draw crashes SWGL r=lsalzman
Guard against nullptr access of missing p.impl.
Also change LinkStatus so is_initialized is no longer true and calling
code can early out if bind_program fails.

Differential Revision: https://phabricator.services.mozilla.com/D81421
2020-06-27 00:17:33 +00:00
Jonathan Kew
a02ceb7081 Bug 1649073 - Bail out of InitSharedFontListForPlatform if we fail to get the dwrite system font collection. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D81494
2020-06-29 14:29:54 +00:00
Andrea Marchesini
34cbc7e2ed Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 11:02:59 +00:00
Razvan Maries
f7cb24cc7e Backed out 8 changesets (bug 1648141) for build bustages on RemoteLazyInputStreamThread.cpp. CLOSED TREE
Backed out changeset e9b4ca0ee700 (bug 1648141)
Backed out changeset b9bb847cee47 (bug 1648141)
Backed out changeset 11dfce46ec14 (bug 1648141)
Backed out changeset d824d2f67f27 (bug 1648141)
Backed out changeset e5b8292e7095 (bug 1648141)
Backed out changeset c1a3d5fa0c61 (bug 1648141)
Backed out changeset 24fdb83db3cd (bug 1648141)
Backed out changeset 749d894dde52 (bug 1648141)
2020-06-29 13:59:16 +03:00
Andrea Marchesini
16339b8334 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 10:29:05 +00:00