gecko-dev/widget/gtk
Michael Smith 6fcebfbe5b Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander
To make the HeadlessCompositorWidget work under Windows as well as Linux, I had
to change the way that I hooked it into the existing CompositorWidget system.
Under GTK, the CompositorWidgetInitData and CompositorWidgetDelegate types
provided the information needed by the headless compositor widget already (the
widget client size). On Windows, however, the definitions of these types
differ, and the client size information is simply retrieved from the platform
APIs when needed.

After this patch, CompositorWidgetDelegate is renamed to
PlatformCompositorWidgetDelegate, and a new base class called
CompositorWidgetDelegate is added with "AsPlatformSpecificDelegate()" and
"AsHeadlessCompositorWidget()" methods. In non-headless mode, widgets use
AsPlatformSpecificDelegate() to access the Windows- and GTK-specific delegate
APIs. In headless mode, AsHeadlessCompositorWidget() is used to access the
singular CompositorWidget implementation for headless. Meanwhile, the
CompositorWidgetInitData IPDL type is made into a union which always contains a
headless-specific HeadlessCompositorWidgetInitData struct and under GTK and
Windows also contains an {X11,Win}CompositorWidgetInitData struct.

This also includes a small patch to ensure that the GPU process and
hardware-accelerated compositing are always disabled under headless mode. These
features weren't activated by default in the Linux environments I tested in, but
did end up activating (and then promptly crashing Firefox) when I tested on
Windows.

MozReview-Commit-ID: CocPoHBDV7H

--HG--
extra : rebase_source : 4581fa63aa3a9f32a8dc2672015a35b9be01b20f
2017-07-06 17:45:34 -07:00
..
compat
compat-gtk3
crashtests Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
mozgtk Bug 1350643 - Part 5.2: Use per-monitor gdkScaleFactor to set contentsScaleFactor & nsWindow::GetDesktopToDeviceScale if running in gtk/wayland. r=karlt 2017-06-16 11:13:59 +08:00
CompositorWidgetChild.cpp Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
CompositorWidgetChild.h Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
CompositorWidgetParent.cpp Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
CompositorWidgetParent.h
gtk2drawing.c bug 1343802 remove unused moz_gtk_enable_style_props r=jhorak+328198 2017-03-27 20:32:16 +02:00
gtk3drawing.cpp Bug 1367576 - Cache results of getting GTK widget borders. r=karlt 2017-06-06 22:27:18 -07:00
gtkdrawing.h Bug 1367576 - Cache results of getting GTK widget borders. r=karlt 2017-06-06 22:27:18 -07:00
IMContextWrapper.cpp Bug 1376407 - part2: Emulate selection when committing composition as collapsed to the end of composition r=m_kato 2017-06-27 03:11:25 -07:00
IMContextWrapper.h Bug 1376407 - part2: Emulate selection when committing composition as collapsed to the end of composition r=m_kato 2017-06-27 03:11:25 -07:00
InProcessX11CompositorWidget.cpp Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
InProcessX11CompositorWidget.h Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
maiRedundantObjectFactory.c
maiRedundantObjectFactory.h
moz.build Bug 1368597 label CompositorWidget and WindowSurface as Graphics BUG_COMPONENT r=rhunt 2017-05-30 14:29:22 +12:00
mozcontainer.cpp
mozcontainer.h Bug 1382142 - Fix a typo about MOZ_CONTAINER_GET_CLASS definition. r=karlt 2017-07-19 17:01:59 +09:00
NativeKeyBindings.cpp Bug 1374862 - Avoid setting gHandled when we don't handle signals. r=masayuki 2017-06-20 17:03:09 -07:00
NativeKeyBindings.h Bug 1339543 part 4 Change nsIWidget::ExecuteNativeKeyBinding() to nsIWidget::GetEditCommands() which just retrieves edit commands for the type r=smaug 2017-05-19 17:49:41 +09:00
nsApplicationChooser.cpp
nsApplicationChooser.h
nsAppShell.cpp Bug 1356681 - Expand headless mode support for linux. r=automatedtester,jrmuizel,kanru 2017-05-18 17:47:10 -07:00
nsAppShell.h
nsBidiKeyboard.cpp
nsBidiKeyboard.h
nsClipboard.cpp Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor. 2017-06-13 13:23:23 +03:00
nsClipboard.h Bug 1353938 - Add a basic clipboard for headless. 2017-04-21 15:21:51 -07:00
nsColorPicker.cpp
nsColorPicker.h
nsCUPSShim.cpp
nsCUPSShim.h
nsDeviceContextSpecG.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
nsDeviceContextSpecG.h
nsDragService.cpp Bug 1353939 - Disable drag service in headless mode. r=jrmuizel 2017-04-10 11:30:52 -07:00
nsDragService.h Bug 1353939 - Disable drag service in headless mode. r=jrmuizel 2017-04-10 11:30:52 -07:00
nsFilePicker.cpp
nsFilePicker.h
nsGtkCursors.h
nsGtkKeyUtils.cpp
nsGtkKeyUtils.h
nsGTKToolkit.h
nsGtkUtils.h
nsIdleServiceGTK.cpp
nsIdleServiceGTK.h
nsIImageToPixbuf.h
nsImageToPixbuf.cpp
nsImageToPixbuf.h
nsLookAndFeel.cpp Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj. 2017-07-31 14:28:48 +10:00
nsLookAndFeel.h Bug 1377348 - Make nsLookAndFeel final to allow the compiler to devirtualize some calls. r=tn 2017-06-30 03:34:15 +02:00
nsNativeThemeGTK.cpp Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel 2017-06-13 11:00:10 -04:00
nsNativeThemeGTK.h Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel 2017-06-13 11:00:10 -04:00
nsPaperPS.cpp
nsPaperPS.h
nsPrintDialogGTK.cpp Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk. 2017-07-12 15:13:37 +10:00
nsPrintDialogGTK.h
nsPrintOptionsGTK.cpp
nsPrintOptionsGTK.h
nsPrintSettingsGTK.cpp
nsPrintSettingsGTK.h
nsPSPrinters.cpp Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj. 2017-07-31 14:28:48 +10:00
nsPSPrinters.h
nsSound.cpp Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk. 2017-07-12 15:13:37 +10:00
nsSound.h Bug 1356681 - Expand headless mode support for linux. r=automatedtester,jrmuizel,kanru 2017-05-18 17:47:10 -07:00
nsToolkit.cpp
nsWidgetFactory.cpp Bug 1377486 - Make nsWindow 'final' to possibly devirtualize some calls. r=tn 2017-07-01 19:59:21 +02:00
nsWindow.cpp Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
nsWindow.h Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
PCompositorWidget.ipdl
PlatformWidgetTypes.ipdlh Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
ScreenHelperGTK.cpp Bug 1350643 - Part 5.2: Use per-monitor gdkScaleFactor to set contentsScaleFactor & nsWindow::GetDesktopToDeviceScale if running in gtk/wayland. r=karlt 2017-06-16 11:13:59 +08:00
ScreenHelperGTK.h Bug 1350643 - Part 2: Use gdk functions to enumerate monitors instead of Xinerama. r=karlt 2017-06-06 17:57:54 +08:00
WakeLockListener.cpp Bug 1360069 - Deal with the case where WakeLockListener is never instantiated. r=gcp 2017-06-27 14:44:39 -07:00
WakeLockListener.h Bug 1360069 - Deal with the case where WakeLockListener is never instantiated. r=gcp 2017-06-27 14:44:39 -07:00
WidgetStyleCache.cpp bug 1319650 mimic gtk_style_context_save() in WidgetStyleCache with a new context r=stransky+263117 2016-12-02 12:39:23 +13:00
WidgetStyleCache.h
WidgetTraceEvent.cpp
WidgetUtilsGtk.cpp
WidgetUtilsGtk.h
WindowSurfaceProvider.cpp
WindowSurfaceProvider.h
WindowSurfaceX11.cpp
WindowSurfaceX11.h
WindowSurfaceX11Image.cpp
WindowSurfaceX11Image.h
WindowSurfaceXRender.cpp
WindowSurfaceXRender.h
X11CompositorWidget.cpp Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
X11CompositorWidget.h Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00