Skip to content

Commit

Permalink
Issue #1751 -- Remove XP_DARWIN
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfbeast authored and roytam1 committed May 5, 2021
1 parent a9c8f3a commit 2f27335
Show file tree
Hide file tree
Showing 36 changed files with 30 additions and 1,254 deletions.
7 changes: 0 additions & 7 deletions build/moz.configure/init.configure
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,6 @@ def target_is_unix(target):

set_define('XP_UNIX', target_is_unix)

@depends(target)
def target_is_darwin(target):
if target.kernel == 'Darwin':
return True

set_define('XP_DARWIN', target_is_darwin)

@depends(target)
def target_is_osx(target):
if target.kernel == 'Darwin' and target.os == 'OSX':
Expand Down
4 changes: 1 addition & 3 deletions config/external/nspr/prcpucfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
* Need to support conditionals that are defined in both the top-level build
* system as well as NSS' build system for now.
*/
#if defined(XP_DARWIN) || defined(DARWIN)
#include "md/_darwin.cfg"
#elif defined(XP_WIN) || defined(_WINDOWS)
#if defined(XP_WIN) || defined(_WINDOWS)
#include "md/_win95.cfg"
#elif defined(__FreeBSD__)
#include "md/_freebsd.cfg"
Expand Down
9 changes: 0 additions & 9 deletions dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ template <int V> class FFmpegDecoderModule
static FFmpegLibWrapper sLibAV;

static const char* sLibs[] = {
#if defined(XP_DARWIN)
"libavcodec.58.dylib",
"libavcodec.57.dylib",
"libavcodec.56.dylib",
"libavcodec.55.dylib",
"libavcodec.54.dylib",
"libavcodec.53.dylib",
#else
"libavcodec.so.58",
"libavcodec-ffmpeg.so.58",
"libavcodec-ffmpeg.so.57",
Expand All @@ -43,7 +35,6 @@ static const char* sLibs[] = {
"libavcodec.so.55",
"libavcodec.so.54",
"libavcodec.so.53",
#endif
};

/* static */ bool
Expand Down
4 changes: 1 addition & 3 deletions dom/plugins/ipc/PluginInstanceChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface,
, mMode(aMode)
, mNames(aNames)
, mValues(aValues)
#if defined(XP_DARWIN) || defined (XP_WIN)
#if defined (XP_WIN)
, mContentsScaleFactor(1.0)
#endif
, mPostingKeyEvents(0)
Expand Down Expand Up @@ -3216,7 +3216,6 @@ PluginInstanceChild::MaybeCreatePlatformHelperSurface(void)
bool
PluginInstanceChild::EnsureCurrentBuffer(void)
{
#ifndef XP_DARWIN
nsIntRect toInvalidate(0, 0, 0, 0);
IntSize winSize = IntSize(mWindow.width, mWindow.height);

Expand Down Expand Up @@ -3260,7 +3259,6 @@ PluginInstanceChild::EnsureCurrentBuffer(void)
NS_ERROR("Cannot create helper surface");
return false;
}
#endif
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion dom/plugins/ipc/PluginInstanceChild.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class PluginInstanceChild : public PPluginInstanceChild
InfallibleTArray<nsCString> mValues;
NPP_t mData;
NPWindow mWindow;
#if defined(XP_DARWIN) || defined(XP_WIN)
#if defined(XP_WIN)
double mContentsScaleFactor;
#endif
double mCSSZoomFactor;
Expand Down
2 changes: 0 additions & 2 deletions dom/plugins/ipc/PluginInstanceParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle*
HWND id;
#elif defined(MOZ_X11)
XID id;
#elif defined(XP_DARWIN)
intptr_t id;
#else
#warning Implement me
#endif
Expand Down
2 changes: 0 additions & 2 deletions dom/plugins/ipc/PluginMessageUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ struct NPAudioDeviceChangeDetailsIPC
typedef HWND NativeWindowHandle;
#elif defined(MOZ_X11)
typedef XID NativeWindowHandle;
#elif defined(XP_DARWIN)
typedef intptr_t NativeWindowHandle; // never actually used, will always be 0
#else
#error Need NativeWindowHandle for this platform
#endif
Expand Down
5 changes: 0 additions & 5 deletions gfx/2d/2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -1481,11 +1481,6 @@ class GFX2D_API Factory
static already_AddRefed<DrawTarget> CreateDrawTargetWithSkCanvas(SkCanvas* aCanvas);
#endif

#ifdef XP_DARWIN
static already_AddRefed<GlyphRenderingOptions>
CreateCGGlyphRenderingOptions(const Color &aFontSmoothingBackgroundColor);
#endif

#ifdef WIN32
static already_AddRefed<DrawTarget> CreateDrawTargetForD3D11Texture(ID3D11Texture2D *aTexture, SurfaceFormat aFormat);

Expand Down
21 changes: 0 additions & 21 deletions gfx/2d/Factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
#include "NativeFontResourceGDI.h"
#endif

#ifdef XP_DARWIN
#include "ScaledFontMac.h"
#include "NativeFontResourceMac.h"
#endif

#ifdef MOZ_WIDGET_GTK
#include "ScaledFontFontconfig.h"
#endif
Expand Down Expand Up @@ -481,12 +476,6 @@ Factory::CreateScaledFontForNativeFont(const NativeFont &aNativeFont, Float aSiz
}
#endif
#endif
#ifdef XP_DARWIN
case NativeFontType::MAC_FONT_FACE:
{
return MakeAndAddRef<ScaledFontMac>(static_cast<CGFontRef>(aNativeFont.mFont), aSize);
}
#endif
#if defined(USE_CAIRO) || defined(USE_SKIA_FREETYPE)
case NativeFontType::CAIRO_FONT_FACE:
{
Expand Down Expand Up @@ -524,8 +513,6 @@ Factory::CreateNativeFontResource(uint8_t *aData, uint32_t aSize,
return NativeFontResourceGDI::Create(aData, aSize,
/* aNeedsCairo = */ true);
}
#elif XP_DARWIN
return NativeFontResourceMac::Create(aData, aSize);
#else
gfxWarning() << "Unable to create cairo scaled font from truetype data";
return nullptr;
Expand Down Expand Up @@ -802,14 +789,6 @@ Factory::CreateWrappingDataSourceSurface(uint8_t *aData,
return newSurf.forget();
}

#ifdef XP_DARWIN
already_AddRefed<GlyphRenderingOptions>
Factory::CreateCGGlyphRenderingOptions(const Color &aFontSmoothingBackgroundColor)
{
return MakeAndAddRef<GlyphRenderingOptionsCG>(aFontSmoothingBackgroundColor);
}
#endif

already_AddRefed<DataSourceSurface>
Factory::CreateDataSourceSurface(const IntSize &aSize,
SurfaceFormat aFormat,
Expand Down
4 changes: 0 additions & 4 deletions ipc/glue/SharedMemoryBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#ifndef mozilla_ipc_SharedMemoryBasic_h
#define mozilla_ipc_SharedMemoryBasic_h

#ifdef XP_DARWIN
# include "mozilla/ipc/SharedMemoryBasic_mach.h"
#else
# include "mozilla/ipc/SharedMemoryBasic_chromium.h"
#endif

#endif // ifndef mozilla_ipc_SharedMemoryBasic_h
Loading

0 comments on commit 2f27335

Please sign in to comment.