Hash :
c19b66f6
Author :
Date :
2023-04-06T11:30:03
EAGL: Define ANGLE_ENABLE_EAGL in build system ANGLE_ENABLE_EAGL is a "build system" decision. Set this and new variable ANGLE_ENABLE_CGL in BUILD.gn file. This is consistent with the other backends. Remove ANGLE_CPU_ARM64. This was used to do ANGLE_ENABLE_EAGL=TRUE when on Catalyst. Instead, let the build system set this. For ANGLE/Chrome buildsystem, this is not set, as Catalyst is not implemented. For WebKit, this should be set at WebKit build settings. Replace `defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)` with simpler expression: `defined(ANGLE_ENABLE_EAGL)`. Replace `defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS)` with simpler expression: `defined(ANGLE_PLATFORM_APPLE)`. Bug: angleproject:8121 Change-Id: I3a0bbabb4347ad11f693e3f7c336ff12f66203d7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404160 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Dan Glastonbury <djg@apple.com> 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 79 80 81 82 83
# 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.
#
# This file houses the build configuration for the ANGLE GL back-ends.
import("../../../../gni/angle.gni")
import("gl_backend.gni")
if (angle_has_build && ozone_platform_gbm) {
import("//build/config/linux/pkg_config.gni")
}
assert(angle_enable_gl)
config("angle_gl_backend_config") {
defines = [ "ANGLE_ENABLE_OPENGL" ]
if (angle_enable_gl_desktop_backend) {
defines += [ "ANGLE_ENABLE_GL_DESKTOP_BACKEND" ]
}
if (angle_enable_gl_null) {
defines += [ "ANGLE_ENABLE_OPENGL_NULL" ]
}
if (ozone_platform_gbm) {
defines += [ "ANGLE_USE_GBM" ]
}
if (is_apple) {
if (angle_enable_cgl) {
defines += [
"GL_SILENCE_DEPRECATION",
"ANGLE_ENABLE_CGL",
]
}
if (angle_enable_eagl) {
defines += [
"GLES_SILENCE_DEPRECATION",
"ANGLE_ENABLE_EAGL",
]
}
}
include_dirs = [ "../../../third_party/khronos" ]
}
angle_source_set("angle_gl_backend") {
sources = gl_backend_sources
public_configs = [ ":angle_gl_backend_config" ]
public_deps = [ "$angle_root:libANGLE_headers" ]
deps = [
"$angle_root:angle_gpu_info_util",
"$angle_root:angle_image_util",
]
if (is_win) {
deps += [ "$angle_root:angle_d3d_format_tables" ]
}
if (angle_use_x11) {
libs = [
"X11",
"Xi",
"Xext",
]
}
if (is_android || is_linux || is_chromeos) {
deps += [ "$angle_root/src/common/linux:angle_dma_buf" ]
}
if (is_apple) {
frameworks = [
"IOSurface.framework",
"QuartzCore.framework",
]
if (angle_enable_eagl) {
frameworks += [ "OpenGLES.framework" ]
} else if (angle_enable_cgl) {
frameworks += [ "OpenGL.framework" ]
}
if (is_mac) {
frameworks += [ "Cocoa.framework" ]
}
}
}