Bug 1694161 - some fixes for the MacOS non unified environment. r=sg
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Sat, 27 Feb 2021 08:05:46 +0000
changeset 569004 5978eab7b4a3964ceb73931018df219f4a5aba76
parent 569003 2a6899090f7941ac78d5fce119e6e8bc97d98d14
child 569005 bb9fa5cd8357fe5e53fa57bba30c7cc90db8f485
push id38247
push usermalexandru@mozilla.com
push dateSat, 27 Feb 2021 21:43:59 +0000
treeherdermozilla-central@abe97e99af31 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssg
bugs1694161
milestone88.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1694161 - some fixes for the MacOS non unified environment. r=sg Differential Revision: https://phabricator.services.mozilla.com/D106616
dom/gamepad/GamepadRemapping.cpp
dom/gamepad/cocoa/CocoaGamepad.cpp
dom/plugins/base/nsPluginTags.cpp
dom/plugins/ipc/PluginInstanceParent.cpp
gfx/2d/NativeFontResourceMac.cpp
gfx/layers/BufferTexture.cpp
gfx/layers/TextureSync.cpp
gfx/layers/composite/ImageComposite.cpp
gfx/layers/ipc/ContentCompositorBridgeParent.cpp
gfx/webrender_bindings/RenderCompositorLayersSWGL.h
--- a/dom/gamepad/GamepadRemapping.cpp
+++ b/dom/gamepad/GamepadRemapping.cpp
@@ -9,16 +9,19 @@
 
 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "mozilla/dom/GamepadRemapping.h"
 #include "mozilla/dom/GamepadPlatformService.h"
 
+#include <vector>
+#include <unordered_map>
+
 namespace mozilla::dom {
 
 // Follow the canonical ordering recommendation for the "Standard Gamepad"
 // from https://www.w3.org/TR/gamepad/#remapping.
 enum CanonicalButtonIndex {
   BUTTON_INDEX_PRIMARY,
   BUTTON_INDEX_SECONDARY,
   BUTTON_INDEX_TERTIARY,
--- a/dom/gamepad/cocoa/CocoaGamepad.cpp
+++ b/dom/gamepad/cocoa/CocoaGamepad.cpp
@@ -4,17 +4,21 @@
  * 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/. */
 
 // mostly derived from the Allegro source code at:
 // http://alleg.svn.sourceforge.net/viewvc/alleg/allegro/branches/4.9/src/macosx/hidjoy.m?revision=13760&view=markup
 
 #include "mozilla/dom/GamepadHandle.h"
 #include "mozilla/dom/GamepadPlatformService.h"
+#include "mozilla/dom/GamepadRemapping.h"
+#include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ArrayUtils.h"
+#include "mozilla/Tainting.h"
+#include "nsComponentManagerUtils.h"
 #include "nsITimer.h"
 #include "nsThreadUtils.h"
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/hid/IOHIDBase.h>
 #include <IOKit/hid/IOHIDKeys.h>
 #include <IOKit/hid/IOHIDManager.h>
 
 #include <stdio.h>
@@ -600,27 +604,27 @@ void DarwinGamepadService::SetLightIndic
 }
 
 }  // namespace
 
 namespace mozilla {
 namespace dom {
 
 void StartGamepadMonitoring() {
-  AssertIsOnBackgroundThread();
+  ::mozilla::ipc::AssertIsOnBackgroundThread();
   if (gService) {
     return;
   }
 
   gService = new DarwinGamepadService();
   gService->Startup();
 }
 
 void StopGamepadMonitoring() {
-  AssertIsOnBackgroundThread();
+  ::mozilla::ipc::AssertIsOnBackgroundThread();
   if (!gService) {
     return;
   }
 
   // Calling Shutdown() will delete gService as well
   gService->Shutdown();
 }
 
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -11,16 +11,17 @@
 #include "nsPluginHost.h"
 #include "nsIBlocklistService.h"
 #include "nsPluginLogging.h"
 #include "nsNPAPIPlugin.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Unused.h"
 #include "nsNetUtil.h"
+#include "prenv.h"
 #include <cctype>
 #include "mozilla/Encoding.h"
 #include "mozilla/dom/FakePluginTagInitBinding.h"
 #include "mozilla/StaticPrefs_plugin.h"
 
 #if defined(XP_MACOSX) && defined(MOZ_SANDBOX)
 #  include "mozilla/SandboxSettings.h"
 #  include "nsCocoaFeatures.h"
--- a/dom/plugins/ipc/PluginInstanceParent.cpp
+++ b/dom/plugins/ipc/PluginInstanceParent.cpp
@@ -3,16 +3,17 @@
  * 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/. */
 
 #include "mozilla/DebugOnly.h"
 #include <stdint.h>  // for intptr_t
 
 #include "mozilla/BasicEvents.h"
+#include "mozilla/D3DMessageUtils.h"  // for DxgiAdapterDesc
 #include "mozilla/Preferences.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/ToString.h"
 #include "mozilla/dom/Element.h"
 #include "PluginInstanceParent.h"
 #include "BrowserStreamParent.h"
 #include "PluginBackgroundDestroyer.h"
--- a/gfx/2d/NativeFontResourceMac.cpp
+++ b/gfx/2d/NativeFontResourceMac.cpp
@@ -1,14 +1,15 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
+#include <unordered_map>
 #include <unordered_set>
 #include "NativeFontResourceMac.h"
 #include "UnscaledFontMac.h"
 #include "Types.h"
 
 #include "mozilla/RefPtr.h"
 #include "mozilla/DataMutex.h"
 
--- a/gfx/layers/BufferTexture.cpp
+++ b/gfx/layers/BufferTexture.cpp
@@ -12,16 +12,18 @@
 #include "mozilla/fallible.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Logging.h"
 #include "mozilla/layers/CompositableForwarder.h"
 #include "mozilla/layers/ISurfaceAllocator.h"
 #include "mozilla/layers/ImageDataSerializer.h"
 #include "mozilla/layers/TextureForwarder.h"
 
+#include "gfxPlatform.h"
+
 #ifdef MOZ_WIDGET_GTK
 #  include "gfxPlatformGtk.h"
 #endif
 
 using mozilla::ipc::IShmemAllocator;
 
 namespace mozilla {
 namespace layers {
--- a/gfx/layers/TextureSync.cpp
+++ b/gfx/layers/TextureSync.cpp
@@ -9,16 +9,17 @@
 #include <unordered_set>
 
 #include "base/process_util.h"
 #include "chrome/common/mach_ipc_mac.h"
 #include "mozilla/ipc/SharedMemoryBasic.h"
 #include "mozilla/layers/CompositorThread.h"
 #include "mozilla/StaticMonitor.h"
 #include "mozilla/StaticPtr.h"
+#include "nsThreadUtils.h"
 
 #ifdef DEBUG
 #  define LOG_ERROR(str, args...)                                  \
     PR_BEGIN_MACRO                                                 \
     mozilla::SmprintfPointer msg = mozilla::Smprintf(str, ##args); \
     NS_WARNING(msg.get());                                         \
     PR_END_MACRO
 #else
--- a/gfx/layers/composite/ImageComposite.cpp
+++ b/gfx/layers/composite/ImageComposite.cpp
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ImageComposite.h"
 
 #include <inttypes.h>
 
 #include "GeckoProfiler.h"
 #include "gfxPlatform.h"
+#include "nsPrintfCString.h"
 
 namespace mozilla {
 
 using namespace gfx;
 
 namespace layers {
 
 /* static */ const float ImageComposite::BIAS_TIME_MS = 1.0f;
--- a/gfx/layers/ipc/ContentCompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/ContentCompositorBridgeParent.cpp
@@ -31,16 +31,17 @@
 #include "mozilla/layers/WebRenderBridgeParent.h"
 #include "mozilla/layers/AsyncImagePipelineManager.h"
 #include "mozilla/webgpu/WebGPUParent.h"
 #include "mozilla/mozalloc.h"  // for operator new, etc
 #include "nsDebug.h"           // for NS_ASSERTION, etc
 #include "nsTArray.h"          // for nsTArray
 #include "nsXULAppAPI.h"       // for XRE_GetIOMessageLoop
 #include "mozilla/Unused.h"
+#include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/Telemetry.h"
 #ifdef MOZ_GECKO_PROFILER
 #  include "mozilla/BaseProfilerMarkerTypes.h"
 #endif
 
 namespace mozilla {
 
--- a/gfx/webrender_bindings/RenderCompositorLayersSWGL.h
+++ b/gfx/webrender_bindings/RenderCompositorLayersSWGL.h
@@ -2,16 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #ifndef MOZILLA_GFX_RENDERCOMPOSITOR_Layers_H
 #define MOZILLA_GFX_RENDERCOMPOSITOR_Layers_H
 
+#include <unordered_map>
+
 #include "mozilla/HashFunctions.h"
 #include "mozilla/layers/Compositor.h"
 #include "mozilla/layers/ScreenshotGrabber.h"
 #include "mozilla/webrender/RenderCompositor.h"
 #include "mozilla/webrender/RenderTextureHost.h"
 
 namespace mozilla {