Hash :
f845a387
Author :
Date :
2020-11-19T16:16:01
Misc. iOS fixes These fixes are necessary for ANGLE to work on iOS. I made these while updating ANGLE in WebKit. Unless we make an iOS bot, there will likely be small fixes like this every time we roll ANGLE in WebKit. Bug: angleproject:4613 Change-Id: Ia0ed432c82d0a43b9514c26ddb65c168c393d50d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551537 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// FunctionsCGL.cpp: Exposing the soft-linked CGL interface.
#include "common/gl/cgl/FunctionsCGL.h"
#include "common/platform.h"
#if defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)
SOFT_LINK_FRAMEWORK_SOURCE(OpenGL)
SOFT_LINK_FUNCTION_SOURCE(OpenGL,
CGLChoosePixelFormat,
CGLError,
(const CGLPixelFormatAttribute *attribs,
CGLPixelFormatObj *pix,
GLint *npix),
(attribs, pix, npix))
SOFT_LINK_FUNCTION_SOURCE(OpenGL,
CGLCreateContext,
CGLError,
(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj *ctx),
(pix, share, ctx))
SOFT_LINK_FUNCTION_SOURCE(
OpenGL,
CGLDescribePixelFormat,
CGLError,
(CGLPixelFormatObj pix, GLint pix_num, CGLPixelFormatAttribute attrib, GLint *value),
(pix, pix_num, attrib, value))
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLDestroyContext, CGLError, (CGLContextObj ctx), (ctx))
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLDestroyPixelFormat, CGLError, (CGLPixelFormatObj pix), (pix))
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLErrorString, const char *, (CGLError error), (error))
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLReleaseContext, void, (CGLContextObj ctx), (ctx))
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLGetCurrentContext, CGLContextObj, (void), ())
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLSetCurrentContext, CGLError, (CGLContextObj ctx), (ctx))
SOFT_LINK_FUNCTION_SOURCE(OpenGL,
CGLSetVirtualScreen,
CGLError,
(CGLContextObj ctx, GLint screen),
(ctx, screen))
SOFT_LINK_FUNCTION_SOURCE(
OpenGL,
CGLTexImageIOSurface2D,
CGLError,
(CGLContextObj ctx,
GLenum target,
GLenum internal_format,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
IOSurfaceRef ioSurface,
GLuint plane),
(ctx, target, internal_format, width, height, format, type, ioSurface, plane))
SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLUpdateContext, CGLError, (CGLContextObj ctx), (ctx))
SOFT_LINK_FUNCTION_SOURCE(
OpenGL,
CGLDescribeRenderer,
CGLError,
(CGLRendererInfoObj rend, GLint rend_num, CGLRendererProperty prop, GLint *value),
(rend, rend_num, prop, value))
SOFT_LINK_FUNCTION_SOURCE(OpenGL,
CGLDestroyRendererInfo,
CGLError,
(CGLRendererInfoObj rend),
(rend))
SOFT_LINK_FUNCTION_SOURCE(OpenGL,
CGLQueryRendererInfo,
CGLError,
(GLuint display_mask, CGLRendererInfoObj *rend, GLint *nrend),
(display_mask, rend, nrend))
#endif // defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)