Hash :
a4341e04
Author :
Date :
2023-04-06T11:05:07
CGL: Remove the impl preprocessor guards
Adhere to the project formatting:
- Remove #if preprocessor guards from the CGL implementation.
- Order the includes as in style guide
- Use include / import consistently
- Move GLES_SILENCE_DEPRECIATION into .gn, similar to CGL
- Remove or add platform.h include based on whether the file
itself actually the platform.h defined macros
Simplifies the nested preprocessor macros. Makes it simpler
to further fix the preprocessor use.
WebKit should instead have a non-ANGLE .mm file #importing
the implementations with the proper include guards.
Moves macOS specific APIs from SystemInfo.h to SystemInfo_internal.h,
since common/platform.h is not available for Chrome clients of
SystemInfo.h
Bug: angleproject:8121
Change-Id: Iaef0d6948fbcef6d1c2e7877477d25ccc259cc2c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404159
Reviewed-by: Dan Glastonbury <djg@apple.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: 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
//
// 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"
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))