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

2216 Коммитов

Автор SHA1 Сообщение Дата
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
stransky 1b305cb7c0 Bug 1650583 [Linux/EGL] Log eglCreateWindowSurface failure, r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D87635
2020-09-03 09:02:37 +00:00
Noemi Erli 3403bbb58e Backed out 4 changesets (bug 1650583) for causing build bustages in rules.mk CLOSED TREE
Backed out changeset 033e491241b1 (bug 1650583)
Backed out changeset e6a03fea3aad (bug 1650583)
Backed out changeset b24be6b2d8cd (bug 1650583)
Backed out changeset bbb04547d367 (bug 1650583)
2020-09-03 02:33:34 +03:00
Martin Stransky 90c4b74c25 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-02 19:45:44 +00:00
Martin Stransky fcbc4fc378 Bug 1650583 [Linux/EGL] Log eglCreateWindowSurface failure, r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D87635
2020-09-02 19:45:57 +00:00
James Willcox 8ce74e9eef Bug 1654459 - Don't use single-buffer SurfaceTexture on emulator r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D89041
2020-09-02 00:13:15 +00:00
Jeff Gilbert 79587135ae Bug 1661328 - Enable Mac webgl-ipc tests on Central. r=jmaher,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D89038
2020-09-01 23:29:01 +00:00
James Willcox 665c0bd32e Bug 1659681 - Avoid crash in ~SharedSurace_SurfaceTexture() when GLContext is lost r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D88889
2020-09-01 13:00:39 +00:00
stransky 4256c8d7fc Bug 1656505 [Linux] Restore active texture when dmabuf texture is created and provide logging to dmabuf surfaces, r=jgilbert
- Restore active texture when dmabuf texture is created at DMABufSurfaceRGBA::CreateTexture()/DMABufSurfaceYUV::CreateTexture.
- Provide more logging for DMABufSurfaceRGBA surfaces.
- Implement DMABufSurfaceRGBA::DumpToFile() to save dmabuf surface content to png file.

Differential Revision: https://phabricator.services.mozilla.com/D88382
2020-09-01 07:24:46 +00:00
sotaro b71cdb204a Bug 1658126 - Fix EGL_ANDROID_native_fence_sync check for android r=jgilbert
On recent android, EGL_ANDROID_native_fence_sync support is not reported even when eglDupNativeFenceFDANDROID() exists.

Differential Revision: https://phabricator.services.mozilla.com/D87995
2020-08-25 14:37:23 +00:00
Nicolas Silva 9f234a0d35 Bug 1660187 - Don't assert if the GL version string is empty. r=jgilbert
It can happen with Pernosco, getting in the way of reproducing problems elsewhere in the code base.

Differential Revision: https://phabricator.services.mozilla.com/D87732
2020-08-25 07:41:12 +00:00