2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 01:20:02 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2017-04-14 12:54:36 +03:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "Widget")
|
|
|
|
|
|
|
|
with Files("crashtests/*1128214*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Layout")
|
|
|
|
|
|
|
|
with Files("crashtests/*303901*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Graphics")
|
|
|
|
|
|
|
|
with Files("crashtests/*380359*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Widget")
|
|
|
|
|
|
|
|
with Files("reftests/**"):
|
|
|
|
BUG_COMPONENT = ("Core", "Widget: Cocoa")
|
|
|
|
|
|
|
|
with Files("reftests/*fallback*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Layout: Form Controls")
|
|
|
|
|
|
|
|
with Files("*CompositorWidget*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Graphics")
|
|
|
|
|
2017-09-19 03:10:50 +03:00
|
|
|
with Files("*Gfx*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Graphics")
|
|
|
|
|
2017-04-14 12:54:36 +03:00
|
|
|
with Files("*FontRange*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Widget: Cocoa")
|
|
|
|
|
2013-02-26 01:20:02 +04:00
|
|
|
toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
|
|
|
|
|
2021-05-07 15:31:26 +03:00
|
|
|
if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
|
2013-02-26 01:20:02 +04:00
|
|
|
DIRS += [toolkit]
|
|
|
|
|
2021-05-07 15:31:26 +03:00
|
|
|
if toolkit == "cocoa":
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
"nsIMacDockSupport.idl",
|
|
|
|
"nsIMacFinderProgress.idl",
|
|
|
|
"nsIMacSharingService.idl",
|
2021-11-02 21:08:08 +03:00
|
|
|
"nsIMacUserActivityUpdater.idl",
|
2021-05-07 15:31:26 +03:00
|
|
|
"nsIMacWebAppUtils.idl",
|
|
|
|
"nsIStandaloneNativeMenu.idl",
|
|
|
|
"nsITaskbarProgress.idl",
|
|
|
|
"nsITouchBarHelper.idl",
|
|
|
|
"nsITouchBarInput.idl",
|
|
|
|
"nsITouchBarUpdater.idl",
|
|
|
|
]
|
|
|
|
elif toolkit == "gtk":
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
"nsIApplicationChooser.idl",
|
|
|
|
"nsIGtkTaskbarProgress.idl",
|
|
|
|
"nsITaskbarProgress.idl",
|
|
|
|
]
|
|
|
|
elif toolkit == "windows":
|
2013-03-12 21:20:41 +04:00
|
|
|
XPIDL_SOURCES += [
|
|
|
|
"nsIJumpListBuilder.idl",
|
|
|
|
"nsIJumpListItem.idl",
|
|
|
|
"nsIPrintSettingsWin.idl",
|
2013-05-17 02:37:18 +04:00
|
|
|
"nsITaskbarOverlayIconController.idl",
|
2013-03-12 21:20:41 +04:00
|
|
|
"nsITaskbarPreview.idl",
|
2013-05-16 21:22:02 +04:00
|
|
|
"nsITaskbarPreviewButton.idl",
|
2013-05-17 02:37:18 +04:00
|
|
|
"nsITaskbarPreviewController.idl",
|
2013-05-16 21:22:02 +04:00
|
|
|
"nsITaskbarProgress.idl",
|
2013-05-17 02:37:18 +04:00
|
|
|
"nsITaskbarTabPreview.idl",
|
|
|
|
"nsITaskbarWindowPreview.idl",
|
2015-06-16 21:51:29 +03:00
|
|
|
"nsIWindowsUIUtils.idl",
|
2013-03-12 21:20:41 +04:00
|
|
|
"nsIWinTaskbar.idl",
|
|
|
|
]
|
|
|
|
|
2020-05-06 18:42:21 +03:00
|
|
|
TEST_DIRS += ["tests", "tests/gtest"]
|
2013-02-26 01:20:02 +04:00
|
|
|
|
2017-04-04 17:22:00 +03:00
|
|
|
DIRS += ["headless"]
|
|
|
|
|
2013-02-26 01:20:02 +04:00
|
|
|
# Don't build the DSO under the 'build' directory as windows does.
|
|
|
|
#
|
|
|
|
# The DSOs get built in the toolkit dir itself. Do this so that
|
|
|
|
# multiple implementations of widget can be built on the same
|
|
|
|
# source tree.
|
|
|
|
#
|
2018-03-08 19:43:00 +03:00
|
|
|
|
2013-03-12 21:17:46 +04:00
|
|
|
XPIDL_SOURCES += [
|
|
|
|
"nsIAppShell.idl",
|
|
|
|
"nsIBaseWindow.idl",
|
|
|
|
"nsIBidiKeyboard.idl",
|
|
|
|
"nsIClipboard.idl",
|
|
|
|
"nsIClipboardHelper.idl",
|
|
|
|
"nsIClipboardOwner.idl",
|
2013-07-03 14:17:26 +04:00
|
|
|
"nsIColorPicker.idl",
|
2015-06-05 06:29:30 +03:00
|
|
|
"nsIDisplayInfo.idl",
|
2013-03-12 21:17:46 +04:00
|
|
|
"nsIDragService.idl",
|
|
|
|
"nsIDragSession.idl",
|
|
|
|
"nsIFilePicker.idl",
|
|
|
|
"nsIFormatConverter.idl",
|
|
|
|
"nsIGfxInfo.idl",
|
|
|
|
"nsIGfxInfoDebug.idl",
|
2020-07-13 22:59:26 +03:00
|
|
|
"nsIPaper.idl",
|
2020-08-05 14:26:13 +03:00
|
|
|
"nsIPaperMargin.idl",
|
2020-07-05 22:00:43 +03:00
|
|
|
"nsIPrinter.idl",
|
|
|
|
"nsIPrinterList.idl",
|
2013-03-12 21:17:46 +04:00
|
|
|
"nsIPrintSession.idl",
|
|
|
|
"nsIPrintSettings.idl",
|
|
|
|
"nsIPrintSettingsService.idl",
|
|
|
|
"nsIScreen.idl",
|
|
|
|
"nsIScreenManager.idl",
|
2019-10-09 13:57:11 +03:00
|
|
|
"nsISharePicker.idl",
|
2013-03-12 21:17:46 +04:00
|
|
|
"nsISound.idl",
|
2020-10-01 00:14:05 +03:00
|
|
|
"nsISystemStatusBar.idl",
|
2013-03-12 21:17:46 +04:00
|
|
|
"nsITransferable.idl",
|
2020-07-20 19:06:59 +03:00
|
|
|
"nsIUserIdleService.idl",
|
|
|
|
"nsIUserIdleServiceInternal.idl",
|
2013-03-12 21:17:46 +04:00
|
|
|
]
|
|
|
|
|
2013-11-19 06:47:43 +04:00
|
|
|
XPIDL_MODULE = "widget"
|
2013-03-19 22:47:00 +04:00
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
2014-10-23 21:16:45 +04:00
|
|
|
"GfxDriverInfo.h",
|
|
|
|
"GfxInfoBase.h",
|
|
|
|
"GfxInfoCollector.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"InputData.h",
|
2019-01-26 02:20:36 +03:00
|
|
|
"nsBaseAppShell.h",
|
2019-01-25 04:27:24 +03:00
|
|
|
"nsBaseDragService.h",
|
|
|
|
"nsBaseFilePicker.h",
|
2014-11-12 23:59:19 +03:00
|
|
|
"nsBaseScreen.h",
|
|
|
|
"nsBaseWidget.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"nsIDeviceContextSpec.h",
|
2017-10-19 05:04:13 +03:00
|
|
|
"nsIPrintDialogService.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"nsIRollupListener.h",
|
|
|
|
"nsIWidget.h",
|
|
|
|
"nsIWidgetListener.h",
|
2020-08-26 14:10:32 +03:00
|
|
|
"nsPaper.h",
|
2020-08-07 15:04:26 +03:00
|
|
|
"nsPrinterListBase.h",
|
2020-07-20 19:06:59 +03:00
|
|
|
"nsUserIdleService.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"nsWidgetInitData.h",
|
|
|
|
"nsWidgetsCID.h",
|
2014-11-12 23:59:19 +03:00
|
|
|
"PuppetWidget.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla += [
|
2013-09-24 14:04:14 +04:00
|
|
|
"BasicEvents.h",
|
2021-10-29 22:58:25 +03:00
|
|
|
"ColorScheme.h",
|
2014-03-14 17:13:30 +04:00
|
|
|
"CommandList.h",
|
2015-06-05 12:28:18 +03:00
|
|
|
"ContentCache.h",
|
2013-09-24 14:04:15 +04:00
|
|
|
"ContentEvents.h",
|
2013-10-18 10:10:20 +04:00
|
|
|
"EventClassList.h",
|
2013-09-24 14:04:14 +04:00
|
|
|
"EventForwards.h",
|
2015-08-22 04:34:51 +03:00
|
|
|
"EventMessageList.h",
|
2015-01-31 10:17:12 +03:00
|
|
|
"FontRange.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"LookAndFeel.h",
|
2013-09-24 14:04:15 +04:00
|
|
|
"MiscEvents.h",
|
2013-09-24 14:04:15 +04:00
|
|
|
"MouseEvents.h",
|
2022-01-05 12:08:05 +03:00
|
|
|
"SwipeTracker.h",
|
2015-01-28 09:27:30 +03:00
|
|
|
"TextEventDispatcher.h",
|
2015-01-28 09:27:32 +03:00
|
|
|
"TextEventDispatcherListener.h",
|
2013-09-24 14:04:15 +04:00
|
|
|
"TextEvents.h",
|
2013-10-22 17:27:36 +04:00
|
|
|
"TextRange.h",
|
2013-09-24 14:04:15 +04:00
|
|
|
"TouchEvents.h",
|
2014-11-21 21:52:24 +03:00
|
|
|
"VsyncDispatcher.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"WidgetUtils.h",
|
|
|
|
]
|
|
|
|
|
2015-04-11 01:18:05 +03:00
|
|
|
EXPORTS.mozilla.widget += [
|
2016-07-01 11:15:16 +03:00
|
|
|
"CompositorWidget.h",
|
2020-10-01 00:14:02 +03:00
|
|
|
"IconLoader.h",
|
2015-08-08 18:47:19 +03:00
|
|
|
"IMEData.h",
|
2016-07-01 11:15:16 +03:00
|
|
|
"InProcessCompositorWidget.h",
|
2019-12-06 23:55:26 +03:00
|
|
|
"MediaKeysEventSourceFactory.h",
|
2021-03-23 16:40:32 +03:00
|
|
|
"NativeMenu.h",
|
2017-03-13 17:44:56 +03:00
|
|
|
"nsAutoRollup.h",
|
2020-12-16 07:17:36 +03:00
|
|
|
"nsXPLookAndFeel.h",
|
2015-04-11 01:18:05 +03:00
|
|
|
"PuppetBidiKeyboard.h",
|
2020-12-16 07:17:36 +03:00
|
|
|
"RemoteLookAndFeel.h",
|
2017-03-14 13:44:54 +03:00
|
|
|
"Screen.h",
|
|
|
|
"ScreenManager.h",
|
2020-10-27 13:24:40 +03:00
|
|
|
"ThemeChangeKind.h",
|
2015-04-22 17:58:15 +03:00
|
|
|
"WidgetMessageUtils.h",
|
2021-10-06 10:21:59 +03:00
|
|
|
"WindowOcclusionState.h",
|
2015-04-11 01:18:05 +03:00
|
|
|
]
|
|
|
|
|
2014-10-23 21:16:45 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2016-07-01 11:15:16 +03:00
|
|
|
"CompositorWidget.cpp",
|
2015-06-05 12:28:18 +03:00
|
|
|
"ContentCache.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"GfxDriverInfo.cpp",
|
|
|
|
"GfxInfoBase.cpp",
|
|
|
|
"GfxInfoCollector.cpp",
|
2020-10-01 00:14:02 +03:00
|
|
|
"IconLoader.cpp",
|
2019-08-30 08:56:58 +03:00
|
|
|
"IMEData.cpp",
|
2016-07-01 11:15:16 +03:00
|
|
|
"InProcessCompositorWidget.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"InputData.cpp",
|
2017-03-13 17:44:56 +03:00
|
|
|
"nsAutoRollup.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"nsBaseAppShell.cpp",
|
|
|
|
"nsBaseScreen.cpp",
|
|
|
|
"nsClipboardHelper.cpp",
|
|
|
|
"nsClipboardProxy.cpp",
|
|
|
|
"nsColorPickerProxy.cpp",
|
|
|
|
"nsContentProcessWidgetFactory.cpp",
|
2015-04-08 21:48:11 +03:00
|
|
|
"nsDragServiceProxy.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"nsFilePickerProxy.cpp",
|
|
|
|
"nsHTMLFormatConverter.cpp",
|
|
|
|
"nsIWidgetListener.cpp",
|
|
|
|
"nsPrimitiveHelpers.cpp",
|
|
|
|
"nsPrintSettingsImpl.cpp",
|
2018-01-16 15:24:51 +03:00
|
|
|
"nsSoundProxy.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"nsTransferable.cpp",
|
2020-07-20 19:06:59 +03:00
|
|
|
"nsUserIdleService.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"nsXPLookAndFeel.cpp",
|
2015-04-11 01:18:05 +03:00
|
|
|
"PuppetBidiKeyboard.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"PuppetWidget.cpp",
|
2020-12-16 07:17:36 +03:00
|
|
|
"RemoteLookAndFeel.cpp",
|
2017-03-14 13:44:54 +03:00
|
|
|
"Screen.cpp",
|
2021-11-15 15:39:38 +03:00
|
|
|
"ScrollbarDrawing.cpp",
|
|
|
|
"ScrollbarDrawingAndroid.cpp",
|
|
|
|
"ScrollbarDrawingCocoa.cpp",
|
|
|
|
"ScrollbarDrawingGTK.cpp",
|
|
|
|
"ScrollbarDrawingWin.cpp",
|
2021-12-16 00:06:58 +03:00
|
|
|
"ScrollbarDrawingWin11.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"SharedWidgetUtils.cpp",
|
2022-01-05 12:08:05 +03:00
|
|
|
"SwipeTracker.cpp",
|
2015-01-28 09:27:30 +03:00
|
|
|
"TextEventDispatcher.cpp",
|
2022-01-12 19:33:31 +03:00
|
|
|
"Theme.cpp",
|
|
|
|
"ThemeCocoa.cpp",
|
2021-11-15 15:39:38 +03:00
|
|
|
"ThemeColors.cpp",
|
|
|
|
"ThemeDrawing.cpp",
|
2020-11-18 06:57:35 +03:00
|
|
|
"TouchResampler.cpp",
|
2014-11-21 21:52:24 +03:00
|
|
|
"VsyncDispatcher.cpp",
|
2014-10-23 21:16:47 +04:00
|
|
|
"WidgetEventImpl.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
"WidgetUtils.cpp",
|
|
|
|
]
|
|
|
|
|
2016-07-26 21:23:47 +03:00
|
|
|
if CONFIG["OS_ARCH"] == "Linux":
|
|
|
|
EXPORTS.mozilla.widget += ["LSBUtils.h"]
|
|
|
|
SOURCES += ["LSBUtils.cpp"]
|
|
|
|
|
2021-12-09 00:37:11 +03:00
|
|
|
if CONFIG["NS_PRINTING"]:
|
2014-11-22 14:15:00 +03:00
|
|
|
EXPORTS += [
|
2016-05-19 13:25:22 +03:00
|
|
|
"nsDeviceContextSpecProxy.h",
|
2017-12-19 13:06:39 +03:00
|
|
|
"nsPrintSettingsService.h",
|
2014-11-22 14:15:00 +03:00
|
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
2016-05-19 13:25:22 +03:00
|
|
|
"nsDeviceContextSpecProxy.cpp",
|
2020-08-05 04:24:49 +03:00
|
|
|
"nsPaper.cpp",
|
2020-08-05 14:26:13 +03:00
|
|
|
"nsPaperMargin.cpp",
|
2020-08-04 15:06:37 +03:00
|
|
|
"nsPrinterBase.cpp",
|
2020-08-07 15:04:26 +03:00
|
|
|
"nsPrinterListBase.cpp",
|
2016-05-19 13:25:22 +03:00
|
|
|
"nsPrintSession.cpp",
|
2017-12-19 13:06:39 +03:00
|
|
|
"nsPrintSettingsService.cpp",
|
2014-11-22 14:15:00 +03:00
|
|
|
]
|
|
|
|
|
2020-08-06 01:15:18 +03:00
|
|
|
if toolkit in ("cocoa", "gtk"):
|
2020-07-29 21:02:21 +03:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"nsCUPSShim.cpp",
|
|
|
|
"nsPrinterCUPS.cpp",
|
2020-08-07 15:04:26 +03:00
|
|
|
"nsPrinterListCUPS.cpp",
|
2020-07-29 21:02:21 +03:00
|
|
|
]
|
2020-08-05 04:24:49 +03:00
|
|
|
|
2014-10-23 21:16:45 +04:00
|
|
|
# nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
|
2016-05-27 23:46:25 +03:00
|
|
|
# nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
|
2014-10-23 21:16:45 +04:00
|
|
|
SOURCES += [
|
2016-05-27 23:46:25 +03:00
|
|
|
"nsBaseDragService.cpp",
|
2016-10-05 18:36:26 +03:00
|
|
|
"nsBaseWidget.cpp",
|
2019-10-17 14:27:08 +03:00
|
|
|
"ScreenManager.cpp",
|
2014-10-23 21:16:45 +04:00
|
|
|
]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
"WidgetTraceEvent.h",
|
|
|
|
]
|
|
|
|
|
2013-07-10 23:08:23 +04:00
|
|
|
EXPORTS.ipc = ["nsGUIEventIPC.h"]
|
2013-04-16 23:24:43 +04:00
|
|
|
|
2014-10-23 21:16:45 +04:00
|
|
|
if CONFIG["MOZ_X11"]:
|
2014-10-23 21:16:47 +04:00
|
|
|
DIRS += ["x11"]
|
2014-10-23 21:16:45 +04:00
|
|
|
|
|
|
|
if toolkit in ("cocoa", "windows"):
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"nsBaseClipboard.cpp",
|
|
|
|
]
|
|
|
|
|
2019-08-21 15:25:42 +03:00
|
|
|
if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
|
2014-10-23 21:16:45 +04:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"nsBaseFilePicker.cpp",
|
|
|
|
]
|
|
|
|
|
2019-08-21 15:25:42 +03:00
|
|
|
if toolkit in ("gtk", "windows", "cocoa", "android"):
|
2014-10-23 21:16:45 +04:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"nsNativeTheme.cpp",
|
|
|
|
]
|
|
|
|
|
2017-08-09 00:41:09 +03:00
|
|
|
DEFINES["MOZ_CROSS_PROCESS_IME"] = True
|
2014-10-23 21:16:45 +04:00
|
|
|
|
|
|
|
include("/ipc/chromium/chromium-config.mozbuild")
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += [
|
2015-04-08 21:48:11 +03:00
|
|
|
"/dom/base",
|
|
|
|
"/dom/ipc",
|
2020-02-10 22:26:01 +03:00
|
|
|
"/gfx/2d",
|
2014-10-23 21:16:45 +04:00
|
|
|
"/layout/base",
|
|
|
|
"/layout/forms",
|
|
|
|
"/layout/generic",
|
2016-11-19 03:37:13 +03:00
|
|
|
"/layout/painting",
|
2014-10-23 21:16:45 +04:00
|
|
|
"/layout/xul",
|
2018-08-07 16:32:07 +03:00
|
|
|
"/layout/xul/tree/",
|
2014-10-23 21:16:45 +04:00
|
|
|
"/view",
|
2014-10-23 21:16:47 +04:00
|
|
|
"/widget",
|
2017-04-04 17:22:00 +03:00
|
|
|
"/widget/headless",
|
2014-10-23 21:16:45 +04:00
|
|
|
]
|
|
|
|
|
2020-07-22 02:39:42 +03:00
|
|
|
# We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
|
|
|
|
if toolkit == "gtk":
|
|
|
|
LOCAL_INCLUDES += ["/third_party/cups/include"]
|
|
|
|
|
2016-07-01 11:15:16 +03:00
|
|
|
if toolkit == "windows":
|
|
|
|
IPDL_SOURCES = [
|
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-07 03:45:34 +03:00
|
|
|
"headless/HeadlessWidgetTypes.ipdlh",
|
2016-07-01 11:15:16 +03:00
|
|
|
"windows/PCompositorWidget.ipdl",
|
2016-07-01 11:15:16 +03:00
|
|
|
"windows/PlatformWidgetTypes.ipdlh",
|
|
|
|
]
|
2019-08-21 15:25:42 +03:00
|
|
|
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
|
2016-07-22 20:23:07 +03:00
|
|
|
IPDL_SOURCES = [
|
|
|
|
"gtk/PCompositorWidget.ipdl",
|
|
|
|
"gtk/PlatformWidgetTypes.ipdlh",
|
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-07 03:45:34 +03:00
|
|
|
"headless/HeadlessWidgetTypes.ipdlh",
|
2016-07-22 20:23:07 +03:00
|
|
|
]
|
Bug 1741156 - Initial GPU process implementation on Android. r=aosmond,agi
Declare a GPU process and corresponding Service in the
AndroidManifest. This is of a new class GeckoServiceGpuProcess which
inherits from GeckoServiceChildProcess, and provides a binder
interface ICompositorSurfaceManager which allows the parent process to
set the compositor Surface for a given widget ID, and the compositor
in the GPU process to look up the Surface for a widget ID. The
ICompositorSurfaceManager interface is exposed to the parent process
through a new method getCompositorSurfaceManager() in the
IChildProcess interface.
Add a new connection type for GPU processes to GeckoProcessManager,
along with a function to look up the GPU process connection and fetch
the ICompositorSurfaceManager binder. When the GPU process is launched
we store the returned binder in the GPUProcessHost, and when each
widget's compositor is created we store a reference to the binder in
the UiCompositorControllerChild.
Each nsWindow is given a unique ID, and whenever the Surface changes
due to an Android resume event, it sends the new surface for that ID
to the GPU process (if enabled) by calling
ICompositorSurfaceManager.onSurfaceChanged().
Stop inheriting AndroidCompositorWidget from InProcessCompositorWidget
and instead inherit from CompositorWidget directly. This class holds a
reference to the Surface that will be rendered in to. The
CompositorBridgeParent notifies the CompositorWidget whenever it has
been resumed, allowing it to fetch the new Surface. For the
cross-process CompositorWidgetParent implementation it fetches that
Surface from the CompositorSurfaceManagerService, whereas the
InProcessAndroidCompositorWidget can read it directly from the real
widget.
AndroidCompositorWidget::GetClientSize() can now calculate its size
from the Surface, rather than racily reading the value from the
nsWindow. This means RenderCompositorEGL and RenderCompositorOGLSWGL
can now use GetClientSize() again rather than querying their own size
from the Surface.
With this patch, setting layers.gpu-process.enabled to true will cause
us to launch a GPU process and render from it. We do not yet
gracefully recover from a GPU process crash, nor can we render
anything using SurfaceTextures (eg video or webgl). Those will come in
future patches.
Differential Revision: https://phabricator.services.mozilla.com/D131231
2021-11-29 23:52:31 +03:00
|
|
|
elif toolkit == "android":
|
|
|
|
IPDL_SOURCES = [
|
|
|
|
"android/PCompositorWidget.ipdl",
|
|
|
|
"android/PlatformWidgetTypes.ipdlh",
|
|
|
|
"headless/HeadlessWidgetTypes.ipdlh",
|
|
|
|
]
|
2016-07-01 11:15:16 +03:00
|
|
|
else:
|
|
|
|
IPDL_SOURCES = [
|
2020-11-12 02:17:40 +03:00
|
|
|
"generic/PCompositorWidget.ipdl",
|
|
|
|
"generic/PlatformWidgetTypes.ipdlh",
|
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-07 03:45:34 +03:00
|
|
|
"headless/HeadlessWidgetTypes.ipdlh",
|
2016-07-01 11:15:16 +03:00
|
|
|
]
|
|
|
|
|
2020-12-22 22:26:41 +03:00
|
|
|
PREPROCESSED_IPDL_SOURCES += [
|
2020-11-12 02:26:51 +03:00
|
|
|
"LookAndFeelTypes.ipdlh",
|
|
|
|
]
|
|
|
|
|
2014-10-23 21:16:45 +04:00
|
|
|
LOCAL_INCLUDES += [
|
2019-08-21 15:25:42 +03:00
|
|
|
"/widget/%s" % toolkit,
|
2014-10-23 21:16:45 +04:00
|
|
|
]
|
|
|
|
FINAL_LIBRARY = "xul"
|
|
|
|
|
|
|
|
if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
|
|
|
|
DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
|
|
|
|
|
2021-12-23 23:29:07 +03:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
|
|
|
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
|
2019-07-02 12:17:22 +03:00
|
|
|
if CONFIG["MOZ_WAYLAND"]:
|
|
|
|
CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
|
2021-08-25 13:46:17 +03:00
|
|
|
|
|
|
|
REQUIRES_UNIFIED_BUILD = True
|