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
//
// Copyright 2019 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.
//
// DeviceCGL.cpp: CGL implementation of egl::Device
#include "libANGLE/renderer/gl/cgl/DeviceCGL.h"
#include <EGL/eglext.h>
#include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
namespace rx
{
DeviceCGL::DeviceCGL() {}
DeviceCGL::~DeviceCGL() {}
egl::Error DeviceCGL::initialize()
{
return egl::NoError();
}
egl::Error DeviceCGL::getAttribute(const egl::Display *display, EGLint attribute, void **outValue)
{
DisplayCGL *displayImpl = GetImplAs<DisplayCGL>(display);
switch (attribute)
{
case EGL_CGL_CONTEXT_ANGLE:
*outValue = displayImpl->getCGLContext();
break;
case EGL_CGL_PIXEL_FORMAT_ANGLE:
*outValue = displayImpl->getCGLPixelFormat();
break;
default:
return egl::EglBadAttribute();
}
return egl::NoError();
}
EGLint DeviceCGL::getType()
{
return 0;
}
void DeviceCGL::generateExtensions(egl::DeviceExtensions *outExtensions) const
{
outExtensions->deviceCGL = true;
}
} // namespace rx