mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
ba52b0e1e3
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 |
||
---|---|---|
.. | ||
bindings | ||
jni | ||
AndroidAlerts.cpp | ||
AndroidAlerts.h | ||
AndroidBridge.cpp | ||
AndroidBridge.h | ||
AndroidBridgeUtilities.h | ||
AndroidCompositorWidget.cpp | ||
AndroidCompositorWidget.h | ||
AndroidContentController.cpp | ||
AndroidContentController.h | ||
AndroidUiThread.cpp | ||
AndroidUiThread.h | ||
AndroidView.h | ||
AndroidVsync.cpp | ||
AndroidVsync.h | ||
Base64UtilsSupport.h | ||
components.conf | ||
CompositorWidgetChild.cpp | ||
CompositorWidgetChild.h | ||
CompositorWidgetParent.cpp | ||
CompositorWidgetParent.h | ||
EventDispatcher.cpp | ||
EventDispatcher.h | ||
GeckoBatteryManager.h | ||
GeckoEditableSupport.cpp | ||
GeckoEditableSupport.h | ||
GeckoNetworkManager.h | ||
GeckoProcessManager.cpp | ||
GeckoProcessManager.h | ||
GeckoSystemStateListener.h | ||
GeckoTelemetryDelegate.h | ||
GeckoViewSupport.h | ||
GeckoVRManager.h | ||
GfxInfo.cpp | ||
GfxInfo.h | ||
ImageDecoderSupport.cpp | ||
ImageDecoderSupport.h | ||
InProcessAndroidCompositorWidget.cpp | ||
InProcessAndroidCompositorWidget.h | ||
MediaKeysEventSourceFactory.cpp | ||
moz.build | ||
nsAppShell.cpp | ||
nsAppShell.h | ||
nsClipboard.cpp | ||
nsClipboard.h | ||
nsDeviceContextAndroid.cpp | ||
nsDeviceContextAndroid.h | ||
nsIAndroidBridge.idl | ||
nsLookAndFeel.cpp | ||
nsLookAndFeel.h | ||
nsPrintSettingsServiceAndroid.cpp | ||
nsPrintSettingsServiceAndroid.h | ||
nsUserIdleServiceAndroid.cpp | ||
nsUserIdleServiceAndroid.h | ||
nsWidgetFactory.cpp | ||
nsWidgetFactory.h | ||
nsWindow.cpp | ||
nsWindow.h | ||
PCompositorWidget.ipdl | ||
PlatformWidgetTypes.ipdlh | ||
ScreenHelperAndroid.cpp | ||
ScreenHelperAndroid.h | ||
Telemetry.h | ||
WebExecutorSupport.cpp | ||
WebExecutorSupport.h | ||
WindowEvent.h |