Commit eb4f2d50 by James Darpinian Committed by Commit Bot

Fix WebKit iOS build

WebKit's iOS and Mac builds do conditional compilation with preprocessor directives rather than relying on the build system. Cocoa.h is not available on iOS, so these Objective-C files must be conditionally compiled. Bug: angleproject:3439 Change-Id: I8a1228f5b14ca6441c7d9a7f1c3f45d060003135 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785653 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 4f431ad1
......@@ -6,10 +6,12 @@
// SystemInfo_mac.cpp: implementation of the Mac-specific parts of SystemInfo.h
#include "gpu_info_util/SystemInfo_internal.h"
#if __has_include(<Cocoa/Cocoa.h>)
#import <Cocoa/Cocoa.h>
#import <IOKit/IOKitLib.h>
# include "gpu_info_util/SystemInfo_internal.h"
# import <Cocoa/Cocoa.h>
# import <IOKit/IOKitLib.h>
namespace angle
{
......@@ -239,3 +241,5 @@ bool GetSystemInfo(SystemInfo *info)
}
} // namespace angle
#endif // __has_include(<Cocoa/Cocoa.h>)
......@@ -6,20 +6,22 @@
// DisplayCGL.mm: CGL implementation of egl::Display
#include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
#if __has_include(<Cocoa/Cocoa.h>)
#import <Cocoa/Cocoa.h>
#include <EGL/eglext.h>
#include <dlfcn.h>
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
#include "common/debug.h"
#include "gpu_info_util/SystemInfo.h"
#include "libANGLE/Display.h"
#include "libANGLE/renderer/gl/cgl/ContextCGL.h"
#include "libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.h"
#include "libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h"
#include "libANGLE/renderer/gl/cgl/RendererCGL.h"
#include "libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h"
# import <Cocoa/Cocoa.h>
# include <EGL/eglext.h>
# include <dlfcn.h>
# include "common/debug.h"
# include "gpu_info_util/SystemInfo.h"
# include "libANGLE/Display.h"
# include "libANGLE/renderer/gl/cgl/ContextCGL.h"
# include "libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.h"
# include "libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h"
# include "libANGLE/renderer/gl/cgl/RendererCGL.h"
# include "libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h"
namespace
{
......@@ -437,3 +439,5 @@ void DisplayCGL::populateFeatureList(angle::FeatureList *features)
mRenderer->getFeatures().populateFeatureList(features);
}
}
#endif // __has_include(<Cocoa/Cocoa.h>)
......@@ -7,21 +7,23 @@
// PBufferSurfaceCGL.cpp: an implementation of PBuffers created from IOSurfaces using
// EGL_ANGLE_iosurface_client_buffer
#include "libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.h"
#import <Cocoa/Cocoa.h>
#include <IOSurface/IOSurface.h>
#include <OpenGL/CGLIOSurface.h>
#include "common/debug.h"
#include "libANGLE/AttributeMap.h"
#include "libANGLE/renderer/gl/BlitGL.h"
#include "libANGLE/renderer/gl/FramebufferGL.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/RendererGL.h"
#include "libANGLE/renderer/gl/StateManagerGL.h"
#include "libANGLE/renderer/gl/TextureGL.h"
#include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
#if __has_include(<Cocoa/Cocoa.h>)
# include "libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.h"
# import <Cocoa/Cocoa.h>
# include <IOSurface/IOSurface.h>
# include <OpenGL/CGLIOSurface.h>
# include "common/debug.h"
# include "libANGLE/AttributeMap.h"
# include "libANGLE/renderer/gl/BlitGL.h"
# include "libANGLE/renderer/gl/FramebufferGL.h"
# include "libANGLE/renderer/gl/FunctionsGL.h"
# include "libANGLE/renderer/gl/RendererGL.h"
# include "libANGLE/renderer/gl/StateManagerGL.h"
# include "libANGLE/renderer/gl/TextureGL.h"
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
namespace rx
{
......@@ -329,3 +331,5 @@ bool IOSurfaceSurfaceCGL::hasEmulatedAlphaChannel() const
}
} // namespace rx
#endif // __has_include(<Cocoa/Cocoa.h>)
......@@ -6,18 +6,20 @@
// WindowSurfaceCGL.cpp: CGL implementation of egl::Surface for windows
#include "libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h"
#if __has_include(<Cocoa/Cocoa.h>)
#import <Cocoa/Cocoa.h>
#include <OpenGL/OpenGL.h>
#import <QuartzCore/QuartzCore.h>
# include "libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h"
#include "common/debug.h"
#include "libANGLE/Context.h"
#include "libANGLE/renderer/gl/FramebufferGL.h"
#include "libANGLE/renderer/gl/RendererGL.h"
#include "libANGLE/renderer/gl/StateManagerGL.h"
#include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
# import <Cocoa/Cocoa.h>
# include <OpenGL/OpenGL.h>
# import <QuartzCore/QuartzCore.h>
# include "common/debug.h"
# include "libANGLE/Context.h"
# include "libANGLE/renderer/gl/FramebufferGL.h"
# include "libANGLE/renderer/gl/RendererGL.h"
# include "libANGLE/renderer/gl/StateManagerGL.h"
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
@interface WebSwapLayer : CAOpenGLLayer {
CGLContextObj mDisplayContext;
......@@ -334,3 +336,5 @@ FramebufferImpl *WindowSurfaceCGL::createDefaultFramebuffer(const gl::Context *c
}
} // namespace rx
#endif // __has_include(<Cocoa/Cocoa.h>)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment