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

2226 Коммитов

Автор SHA1 Сообщение Дата
Cosmin Sabou 7b8c450692 Backed out changeset ece826cc95e0 (bug 1688668) for causing bug 1688999.
CLOSED TREE
2021-01-27 01:05:40 +02:00
Andrew Osmond a750b3733f Bug 1680759 - Enable EGL robustness with WebRender on Linux. r=jgilbert
This patch enables EGL robustness with WebRender. It also tries harder
to get RBAB, favouring KHR+RBAB over EXT-RBAB, as testing with Intel and
NVIDIA Mesa drivers on Ubuntu suggests we can get KHR+RBAB but not
EXT+RBAB. It also adds support for requesting NVIDIA specific resets via
EGL_NV_robustness_video_memory_purge.

Differential Revision: https://phabricator.services.mozilla.com/D102971
2021-01-26 02:25:08 +00:00
Andrew Osmond 5f8c60ba8d Bug 1688668 - EGL should attempt to load libGL before libGLES. r=jgilbert
Not all configurations have both libGL and libGLES present, and this
matches the order which glxtest loads them. Without this, a user might
pass glxtest, which says they can use EGL, but then not have libGLES on
the library path.

Differential Revision: https://phabricator.services.mozilla.com/D102936
2021-01-25 21:12:52 +00:00
Jeff Gilbert f4699b02fe Bug 1687438 - Bail if null iosurf for GLBlitHelper::BlitImage. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102373
2021-01-20 01:49:32 +00:00
Jeff Gilbert 7d80634d28 Bug 1687231 - Make failures non-fatal in Nightly !DEBUG builds. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102370
2021-01-20 01:35:31 +00:00
Sylvestre Ledru 912aeb9ab5 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D102084
2021-01-18 16:50:16 +00:00
Jeff Gilbert a8926ffa47 Bug 1640607 - Send SurfaceDescriptors for GPU blitting for video-to-webgl. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D101061
2021-01-14 01:23:06 +00:00
Andi-Bogdan Postelnicu 7b246e293f Bug 1683551 - Make `gfx` buildable outside of `unified-build` environment. r=sg,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D100209
2021-01-04 14:20:17 +00:00
Andrew Osmond 627b3749af Bug 1682876 - Better handle Linux NVIDIA device resets, and unflushed device resets. r=sotaro,jgilbert
These NVIDIA device resets are specific to Linux and trying to handle
them more gracefully is increasingly difficult. There are many
textures/buffers that we need to clear inside WebRender, but attempting
to add them to the list has proved difficult due to the number of places
we need to add, as well as race conditions with clearing them. Given
this shouldn't happen often, it doesn't seem worth optimizing for and we
should treat it just as an innocent device reset.

Testing this revealed an issue during recovery where unflushed device
resets were not handled as expected. When we checked for errors after
creating a new GL context, we would encounter a GL_CONTEXT_LOST error
which we failed to recover from. This is because we called
GLContext::fGetError instead of the GL method directly; the context lost
state was saved in mContextLost, and any subsequent calls to
GLContext::fGetError would continue to return GL_CONTEXT_LOST.

Differential Revision: https://phabricator.services.mozilla.com/D99905
2020-12-18 12:52:00 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Robert Mader c2fc1023f9 Bug 1679022 - Silence warnings about non-essential extensions during EGL init, r=jgilbert
We already explicitly warn if essential extensions are missing -
these warnings clutter debug logs quite a bit.

Differential Revision: https://phabricator.services.mozilla.com/D97883
2020-11-23 18:15:36 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke aabaf2b7e8 Bug 1676370 - Remove unused includes from GLLibraryEGL.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D96543

Depends on D96542
2020-11-23 16:09:32 +00:00
Simon Giesecke 8c0d8f3f46 Bug 1676370 - Remove unused includes from GLContext.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D96542

Depends on D96541
2020-11-23 16:09:28 +00:00
Simon Giesecke c077183836 Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93235

Depends on D93234
2020-11-23 16:03:47 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru 0129dd3f83 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D96608
2020-11-16 22:09:25 +00:00
Andrew Osmond ca9f3b661d Bug 1677165 - Add support for partial present to GLX. r=kvark,jgilbert
This adds support for GLX_EXT_buffer_age if available to minimize how
much must be redrawn when using GLX.

Differential Revision: https://phabricator.services.mozilla.com/D93098
2020-11-13 18:41:41 +00:00
Jeff Muizelaar fe07fef3bd Bug 1620075. Add a feature flag to allow ES3 on 10.0 devices.
We set the feature flag when creating the EGL display. This lets us run
WebRender on devices that only support D3D 10.0

Differential Revision: https://phabricator.services.mozilla.com/D96452
2020-11-10 02:24:53 +00:00
Jeff Muizelaar 030b73a0a5 Bug 1620075. Use GetPlatformDisplay instead of GetPlatformDisplayEXT. r=jgilbert
GetPlatformDisplay takes a list of EGLAttrib instead of EGLInt. This is needed
if we want to pass EGL_FEATURE_OVERRIDES_ENABLED_ANGLE.

Differential Revision: https://phabricator.services.mozilla.com/D96451
2020-11-10 02:23:09 +00:00
Jeff Gilbert 962773730d Bug 1663152 - Ask for 3.2core+ if !REQUIRE_COMPAT_PROFILE on EGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D93041
2020-11-07 00:37:07 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Jean-Yves Avenard 648ba057e8 Bug 1595994 - P19. Add fast path readback for IOSurface image created out of process. r=jgilbert
When using a software decoder, the IOSurface type is using a YUV422 before which is only usable with webrender.
For now, disable the test that attempts to check if a fast read is possible when not running webrender.

These tests can be re-enabled once WebGL works in the GPU process.

Depends on D91695

Differential Revision: https://phabricator.services.mozilla.com/D91696
2020-10-20 23:29:02 +00:00
Jean-Yves Avenard 8f361435da Bug 1595994 - P18. Don't attempt to directly read a GPUVideoImage if it can't be. r=jgilbert
GPUVideoImage can be used on other platform than Windows; if so it will be made of an opaque handle referencing the texture as known by the PVideoBridge.
Only if a sub-description is set can you directly read the image from the content process.

Depends on D91694

Differential Revision: https://phabricator.services.mozilla.com/D91695
2020-10-20 23:28:48 +00:00
Kartikaya Gupta 6d47eac4ee Bug 1666802 - Remove LayersLogging.*. r=mattwoodrow
The remaining functions are moved to be with their brethren in xpcom.

Differential Revision: https://phabricator.services.mozilla.com/D93146
2020-10-11 21:20:46 +00:00
Dorel Luca f1977d1074 Backed out changeset 016992fe00d7 (bug 1663152) for Browser-chrome failures in browser/base/content/test/performance/browser_startup_mainthreadio.js. CLOSED TREE 2020-10-09 10:53:09 +03:00
Jeff Gilbert 7ac2fb745a Bug 1663152 - Ask for 3.2core+ if !REQUIRE_COMPAT_PROFILE on EGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D93041
2020-10-09 00:34:31 +00:00
Jeff Gilbert a426e3880b Bug 1669381 - Replace GLLibraryEGL nsIGfxInfo use with gfxVars. r=mattwoodrow
+ Remove now-unused gfxUtils::ThreadSafeGetFeatureStatus.

Differential Revision: https://phabricator.services.mozilla.com/D92529
2020-10-06 05:43:33 +00:00
Jamie Nicol 7adec85b80 Bug 1575765 - Implement KHR_partial_update for webrender. r=sotaro,jgilbert
KHR_partial_update allows us to avoid rerendering the entire
backbuffer every frame, and instead only render what has changed on
the current frame, as well as the difference between the current
backbuffer and the current frontbuffer. It works similarily to
EXT_buffer_age, which we already support, with the additional
requirement that we must call eglSetDamageRegion each frame before
rendering to the backbuffer.

Modify GLContextEGL::GetBufferAge() so that it queries the age if
either EXT_buffer_age or KHR_partial_update are available. This will
now automatically be queried by webrender through the
PartialPresentCompositor trait. Add a new function to that trait,
set_buffer_damage_region(), whose RenderCompositorEGL implementation
calls eglSetDamageRegion(). Call this from composite_simple(), once
the damage rect has been calculated but before rendering to the
backbuffer.

Additionally, change both RenderCompositorEGL and
RenderCompositorOGL's implementations of
ShouldDrawPreviousPartialPresentRegions() to unconditionally return
true, rather than checking for the existence of EXT_buffer_age (or
adding a new check for KHR_partial_update). The lack of these
extensions does not mean that webrender is able to skip rendering
previous frames' damage. Rather the opposite, it means we cannot
render *only* the previous frames' damage, and must instead always
render the entire buffer.

Differential Revision: https://phabricator.services.mozilla.com/D91203
2020-10-02 10:23:56 +00:00
Razvan Maries 63b41aa30f Backed out 3 changesets (bug 1656533, bug 1575765) for WebRender bustages. CLOSED TREE
Backed out changeset 84c31fd9ff82 (bug 1575765)
Backed out changeset 48c1532d1d9d (bug 1575765)
Backed out changeset ed9075d9319b (bug 1656533)
2020-10-02 12:51:55 +03:00
Jamie Nicol 5b8c7d826e Bug 1575765 - Implement KHR_partial_update for webrender. r=sotaro,jgilbert
KHR_partial_update allows us to avoid rerendering the entire
backbuffer every frame, and instead only render what has changed on
the current frame, as well as the difference between the current
backbuffer and the current frontbuffer. It works similarily to
EXT_buffer_age, which we already support, with the additional
requirement that we must call eglSetDamageRegion each frame before
rendering to the backbuffer.

Modify GLContextEGL::GetBufferAge() so that it queries the age if
either EXT_buffer_age or KHR_partial_update are available. This will
now automatically be queried by webrender through the
PartialPresentCompositor trait. Add a new function to that trait,
set_buffer_damage_region(), whose RenderCompositorEGL implementation
calls eglSetDamageRegion(). Call this from composite_simple(), once
the damage rect has been calculated but before rendering to the
backbuffer.

Additionally, change both RenderCompositorEGL and
RenderCompositorOGL's implementations of
ShouldDrawPreviousPartialPresentRegions() to unconditionally return
true, rather than checking for the existence of EXT_buffer_age (or
adding a new check for KHR_partial_update). The lack of these
extensions does not mean that webrender is able to skip rendering
previous frames' damage. Rather the opposite, it means we cannot
render *only* the previous frames' damage, and must instead always
render the entire buffer.

Differential Revision: https://phabricator.services.mozilla.com/D91203
2020-10-02 08:38:29 +00:00
sotaro 0666f42a43 Bug 1667932 - Fix file descriptor handling in SharedSurface_AndroidHardwareBuffer::WaitForBufferOwnership() r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D91704
2020-09-29 22:44:33 +00:00
sotaro 33ae1c138c Bug 1665241 - Simplify SurfaceFactory::Create() at TextureType::AndroidNativeWindow case r=jgilbert
When TextureType::AndroidNativeWindow is chosen StaticPrefs::webgl_enable_surface_texture() should be true.

Differential Revision: https://phabricator.services.mozilla.com/D90340
2020-09-29 04:28:48 +00:00
sotaro 36fb807eb2 Bug 1665300 - Disable glGetGraphicsResetStatus usage on android emulator r=jgilbert
glGetGraphicsResetStatus does not work on android emulator both with SwiftShader and with GPU.

Differential Revision: https://phabricator.services.mozilla.com/D90391
2020-09-29 04:37:22 +00:00
sotaro 67e6515719 Bug 1663381 - Reduce file descriptor usage at SharedSurface_AndroidHardwareBuffer r=nical
We needs to reduce file descriptor creation for AndroidHardwareBuffer to avoid out of file descriptor situation. SharedSurface_AndroidHardwareBuffer::ToSurfaceDescriptor() is called for every composition. It causes avoid out of file descriptor.

By the change, file descriptor is created only once for each AndroidHardwareBuffer of SharedSurface_AndroidHardwareBuffer.

Differential Revision: https://phabricator.services.mozilla.com/D90066
2020-09-28 20:29:50 +00:00
Steven Michaud 69821ba2af Bug 1666293 - Flush explicitly before deleting textures. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D90893
2020-09-21 20:24:51 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Matt Woodrow 77b568f7af Bug 1660709 - Use MacIOSurface code to determine texture formats when binding an IOSurface to a texture. r=jgilbert
The GLBlitHelper version was reimplementing the same logic, and didn't have support for all the pixel types needed.

Differential Revision: https://phabricator.services.mozilla.com/D88125
2020-09-10 23:38:30 +00:00
John Lin b3c72383ca Bug 1655915 - p3: make AndroidSharedBlitGL unique. r=jgilbert
AndroidSharedBlitGL is never shared with other objects and doesn't
have to be ref-counted.

Differential Revision: https://phabricator.services.mozilla.com/D89532
2020-09-09 00:05:20 +00:00
John Lin a79f02d04e Bug 1655915 - p1: properly release surface. r=snorp,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D89530
2020-09-16 16:59:49 +00:00
stransky c14c6f5775 Bug 1663003 [Linux/EGL] When we can't find EGLConfig with actual XVisual, use the first suitable one, r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D89720
2020-09-11 10:39:56 +00:00
sotaro 872ccfe115 Bug 1649088 - Add SharedSurface support with AHardwareBuffer support on android r=jgilbert
AHardwareBuffer could remove several limitations of android::SurfaceTexture.

File descriptor usage of current implementation is not efficient. It is going to be addressed by Bug 1663381.

Differential Revision: https://phabricator.services.mozilla.com/D89232
2020-09-11 03:11:45 +00:00
sotaro 5d9e5a2687 Bug 1654475 - SharedSurface_SurfaceTexture: Only ReleaseTexImage if IsSingleBuffer r=jgilbert
SharedSurface_SurfaceTexture::ProducerReadReleaseImpl() handles java::GeckoSurfaceTexture. But how it work is very confusing. The GeckoSurfaceTexture is not SurfaceTexture of this class's GeckoSurface when current process is content process. SurfaceTexture of this class's GeckoSurface does not exist in this process. It exists in compositor's process. Then GeckoSurfaceTexture in this process is a sync surface that copies back the SurfaceTextrure from compositor's process.

Call ReleaseTexImage() only when Surface is single buffer mode, since it needs to be called only when Surface is single buffer mode.

Differential Revision: https://phabricator.services.mozilla.com/D84477
2020-09-10 17:19:15 +00:00
Narcis Beleuzu 69a21ed2df Backed out 2 changesets (bug 1663003) for bustages on nsWindow.cpp . CLOSED TREE
Backed out changeset 50a87c4ddf15 (bug 1663003)
Backed out changeset c3035ba4d8fc (bug 1663003)
2020-09-10 23:40:09 +03:00
stransky f49660886e Bug 1663003 [Linux/EGL] When we can't find EGLConfig with actual XVisual, use the first suitable one, r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D89720
2020-09-10 17:47:37 +00:00
stransky 3468f83483 Bug 1650583 [Linux/EGL] Implement GLContextEGL::FindVisual(), r=jgilbert
Implement GLContextEGL::FindVisual() as a EGL counterpart of GLContextGLX::FindVisual() used
by GLX.

We need to make sure that GdkWindow uses the same visual as GL framebuffer we use for it.
That was already implemented for GLX backend (Bug 1478454).

The visual match is implemented by visual parameter at CreateConfig()/CreateConfigScreen() routines and when it's non-zero,
try to find exact match based on visual ID.

Differential Revision: https://phabricator.services.mozilla.com/D87636
2020-09-03 09:02:44 +00:00