gecko-dev/widget/android
Jamie Nicol ba52b0e1e3 Bug 1824083 - Request new Surface from application when resuming compositor fails on Android. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
We see a fair number of crashes caused by failing to create an EGL
surface when resuming the compositor on Android. We believe that in
the vast majority of these cases the Surface we have been provided by
the OS is in an invalid state, and therefore we will never succeed in
creating an EGL surface from it.

Currently when creating the EGL surface fails we raise a NEW_SURFACE
webrender error. This causes us to fall back through webrender
configurations, reinitialize the compositors, and eventually crash
when we are still unable to resume. None of this will help when the
Android Surface we have been provided is in this invalid state.

This patch therefore avoids raising the webrender error initially, and
instead gives the widget an opportunity to handle the failure. The
widget uses the new GeckoView API added in the previous patch in this
series to request a new Surface from the application. This will cause
another resume event immediately afterwards with a new - and hopefully
valid - surface, allowing the EGL surface to be created and the
compositor to be successfully resumed. If we are still unable to
create an EGL surface after this, then we will raise the webrender
error as before, likely eventually resulting in a crash.

Differential Revision: https://phabricator.services.mozilla.com/D176721
2023-05-10 15:50:22 +00:00
..
bindings
jni Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish 2023-05-09 05:13:32 +00:00
AndroidAlerts.cpp Bug 1787004 - Fix notifications not closing when notification.close() is called. r=nalexander,geckoview-reviewers,smaug,jonalmeida 2023-01-06 18:36:23 +00:00
AndroidAlerts.h
AndroidBridge.cpp
AndroidBridge.h
AndroidBridgeUtilities.h
AndroidCompositorWidget.cpp Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato 2023-05-10 15:50:21 +00:00
AndroidCompositorWidget.h
AndroidContentController.cpp Bug 1774875 - Immediately fire click events for non-scrollable elements. r=botond,geckoview-reviewers,m_kato 2023-04-20 13:26:25 +00:00
AndroidContentController.h Bug 1774875 - Immediately fire click events for non-scrollable elements. r=botond,geckoview-reviewers,m_kato 2023-04-20 13:26:25 +00:00
AndroidUiThread.cpp Bug 1825360 - Remove the NS_DISPATCH_SYNC flag, r=necko-reviewers,geckoview-reviewers,media-playback-reviewers,karlt,jesup,m_kato,emilio 2023-03-30 16:53:51 +00:00
AndroidUiThread.h
AndroidView.h
AndroidVsync.cpp Bug 1822175 - Clean up dynamic refresh rate support on GeckoView. r=geckoview-reviewers,owlish 2023-03-22 15:35:16 +00:00
AndroidVsync.h Bug 1813573 - Part 2. Restart vsync when refresh rate is changed. r=geckoview-reviewers,owlish 2023-03-01 03:12:32 +00:00
Base64UtilsSupport.h
components.conf
CompositorWidgetChild.cpp
CompositorWidgetChild.h
CompositorWidgetParent.cpp
CompositorWidgetParent.h
EventDispatcher.cpp
EventDispatcher.h
GeckoBatteryManager.h
GeckoEditableSupport.cpp Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish 2023-05-09 05:13:32 +00:00
GeckoEditableSupport.h
GeckoNetworkManager.h
GeckoProcessManager.cpp
GeckoProcessManager.h
GeckoSystemStateListener.h
GeckoTelemetryDelegate.h
GeckoViewSupport.h Bug 1659818 - Android window.print Implemented for Nightly r=emilio,m_kato,geckoview-reviewers 2023-03-15 21:23:12 +00:00
GeckoVRManager.h
GfxInfo.cpp Bug 1828192 [Linux] Run glxtest directly from GfxInfo::GetData() in case we're missing glx test data r=emilio 2023-04-20 08:54:17 +00:00
GfxInfo.h Bug 1812698 - Expose desktopEnvironment via nsIXULRuntime rather than nsIGfxInfo. r=stransky 2023-02-01 13:14:50 +00:00
ImageDecoderSupport.cpp
ImageDecoderSupport.h
InProcessAndroidCompositorWidget.cpp
InProcessAndroidCompositorWidget.h
MediaKeysEventSourceFactory.cpp
moz.build Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato 2023-05-10 15:50:21 +00:00
nsAppShell.cpp Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato 2023-05-10 15:50:21 +00:00
nsAppShell.h
nsClipboard.cpp Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato 2023-02-01 23:30:55 +00:00
nsClipboard.h
nsDeviceContextAndroid.cpp
nsDeviceContextAndroid.h
nsIAndroidBridge.idl
nsLookAndFeel.cpp Bug 1794628 - Implement inverted-colors media feature r=geckoview-reviewers,morgan,emilio,m_kato,cmartin 2023-04-11 13:34:00 +00:00
nsLookAndFeel.h
nsPrintSettingsServiceAndroid.cpp
nsPrintSettingsServiceAndroid.h
nsUserIdleServiceAndroid.cpp Bug 1768920 - Avoid polling every 5 seconds in nsUserIdleService, r=dthayer,geckoview-reviewers,owlish. 2023-01-16 19:53:33 +00:00
nsUserIdleServiceAndroid.h Bug 1768920 - Avoid polling every 5 seconds in nsUserIdleService, r=dthayer,geckoview-reviewers,owlish. 2023-01-16 19:53:33 +00:00
nsWidgetFactory.cpp
nsWidgetFactory.h
nsWindow.cpp Bug 1824083 - Request new Surface from application when resuming compositor fails on Android. r=gfx-reviewers,geckoview-reviewers,nical,m_kato 2023-05-10 15:50:22 +00:00
nsWindow.h Bug 1826027 - Check whether window is destroyed during starting touch event. r=geckoview-reviewers,calu 2023-04-04 04:00:09 +00:00
PCompositorWidget.ipdl
PlatformWidgetTypes.ipdlh
ScreenHelperAndroid.cpp Bug 1813573 - Part 2. Restart vsync when refresh rate is changed. r=geckoview-reviewers,owlish 2023-03-01 03:12:32 +00:00
ScreenHelperAndroid.h
Telemetry.h
WebExecutorSupport.cpp Bug 1818305 - Part 2: Add a streamStatus method to nsIInputStream, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,valentin,jesup,m_kato,mccr8 2023-03-15 19:52:34 +00:00
WebExecutorSupport.h
WindowEvent.h