Commit c2f61690 authored by Corentin Wallez's avatar Corentin Wallez Committed by Commit Bot

Reuse use_egl instead of having use_egl_on_mac

Also addresses rsesek's comment on --use-gl=angle on Mac:
 - Put ANGLE libraries in Libraries/ instead of dumping them in
Contents.
 - Use a better name for the temporary copies of the libraries before
bundle_data.

Also fix a compile error for a newly introduced gfx::BufferFormat.

BUG=chromium:757974

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0f8ca4ed88ba45e97afce545982065699203a232
Reviewed-on: https://chromium-review.googlesource.com/959045
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543136}
parent 80aa15f4
......@@ -961,18 +961,18 @@ if (is_win) {
}
}
if (use_egl_on_mac) {
if (use_egl) {
# We need to copy the ANGLE libraries so that the bundle_data dependencies
# have a "copy" target type. Otherwise for "shared_library" target types
# it will try to link things into Chromium.app when we want to keep the
# ANGLE libraries separate instead.
# it will try to link things into Chromium Framework when we want to keep
# the ANGLE libraries separate instead.
copy("angle_library_copy") {
sources = [
"$root_out_dir/libEGL.dylib",
"$root_out_dir/libGLESv2.dylib",
]
outputs = [
"$root_out_dir/for_bundle/{{source_file_part}}",
"$root_out_dir/egl_intermediates/{{source_file_part}}",
]
deps = [
"//third_party/angle:libEGL",
......@@ -983,11 +983,11 @@ if (is_win) {
# Add the ANGLE .dylibs in the MODULE_DIR of Chromium.app
bundle_data("angle_binaries") {
sources = [
"$root_out_dir/for_bundle/libEGL.dylib",
"$root_out_dir/for_bundle/libGLESv2.dylib",
"$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib",
]
outputs = [
"{{bundle_contents_dir}}/{{source_file_part}}",
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
]
public_deps = [
":angle_library_copy",
......@@ -996,7 +996,7 @@ if (is_win) {
}
group("angle_library") {
if (use_egl_on_mac) {
if (use_egl) {
deps = [
":angle_binaries",
]
......
......@@ -25,6 +25,7 @@ if (is_android) {
buildflag_header("gl_features") {
header = "gl_features.h"
use_egl_on_mac = use_egl && is_mac
flags = [
"ENABLE_SWIFTSHADER=$enable_swiftshader",
"USE_EGL_ON_MAC=$use_egl_on_mac",
......
......@@ -7,11 +7,7 @@ declare_args() {
# False by default, enabling currently supported only on Android
use_static_angle = false
# Whether experimental support for ANGLE on Mac should be enabled.
# False by default since it is experimental
use_egl_on_mac = false
# Should EGL support be compiled. Can be overriden to test during bring up
# of EGL support on other platforms
use_egl = is_win || is_android || is_linux || is_fuchsia
}
# Should EGL support be compiled
use_egl =
is_win || is_android || is_linux || is_fuchsia || (is_mac && use_egl_on_mac)
......@@ -53,6 +53,7 @@ InternalFormatType BufferFormatToInternalFormatType(gfx::BufferFormat format) {
case gfx::BufferFormat::BGR_565:
case gfx::BufferFormat::RGBA_4444:
case gfx::BufferFormat::RGBX_8888:
case gfx::BufferFormat::RGBX_1010102:
case gfx::BufferFormat::YVU_420:
NOTREACHED();
return {GL_NONE, GL_NONE};
......
......@@ -134,8 +134,8 @@ bool InitializeStaticCGLInternal(GLImplementation implementation) {
}
#if BUILDFLAG(USE_EGL_ON_MAC)
const char kGLESv2ANGLELibraryName[] = "libGLESv2.dylib";
const char kEGLANGLELibraryName[] = "libEGL.dylib";
const char kGLESv2ANGLELibraryName[] = "Libraries/libGLESv2.dylib";
const char kEGLANGLELibraryName[] = "Libraries/libEGL.dylib";
bool InitializeStaticEGLInternal(GLImplementation implementation) {
if (implementation == kGLImplementationSwiftShaderGL) {
......
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