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

2234 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Narcis Beleuzu 198358fc15 Backed out changeset a4f4f640eaa7 (bug 1696845) for bustages on pangofc-fontmap.h 2021-03-10 04:49:51 +02:00
Jan Alexander Steffens (heftig) 1261a74d17 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-09 22:55:47 +00:00
Andrew Osmond 3bd304e55e 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-02-27 21:25:16 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke d2caea36fa Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Simon Giesecke 8df74b1582 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in gfx. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D104216
2021-02-09 18:19:40 +00:00
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