Commit 4d42ef39 by Ian Elliott Committed by Commit Bot

Add A4A opt-in/out logic

This version of the code #ifdef's out the JSON-parsing code (which dependency was not yet found). Instead, 2 in-code rules are created and used (default and run Maps). Bug: angleproject:2794 Change-Id: I9d8c00459d5e674035f4073ccb839fac8d4d7aa5 Reviewed-on: https://chromium-review.googlesource.com/1200375 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 7ada46c9
...@@ -232,22 +232,28 @@ config("angle_feature_support_util_config") { ...@@ -232,22 +232,28 @@ config("angle_feature_support_util_config") {
} }
static_library("angle_feature_support_util") { static_library("angle_feature_support_util") {
sources = [
"src/feature_support_util/feature_support_util.cpp",
"src/feature_support_util/feature_support_util.h",
]
configs -= angle_undefine_configs configs -= angle_undefine_configs
configs += [ configs += [
":internal_config", ":internal_config",
":extra_warnings", ":extra_warnings",
] ]
public_configs = [ ":angle_feature_support_util_config" ] public_configs = [
":angle_feature_support_util_config",
"third_party/jsoncpp:jsoncpp_config",
]
public_deps = [ public_deps = [
":angle_common", ":angle_common",
] ]
sources = [
"src/feature_support_util/feature_support_util.cpp",
"src/feature_support_util/feature_support_util.h",
]
deps = [
"third_party/jsoncpp:jsoncpp",
]
} }
config("angle_gpu_info_util_config") { config("angle_gpu_info_util_config") {
...@@ -493,13 +499,15 @@ static_library("libANGLE") { ...@@ -493,13 +499,15 @@ static_library("libANGLE") {
":angle_common", ":angle_common",
] ]
deps = [ deps = [
":angle_feature_support_util",
":angle_gpu_info_util", ":angle_gpu_info_util",
":angle_image_util", ":angle_image_util",
":commit_id", ":commit_id",
":includes", ":includes",
":translator", ":translator",
] ]
if (is_android) {
deps += [ ":angle_feature_support_util" ]
}
# Shared D3D sources. # Shared D3D sources.
if (angle_enable_d3d9 || angle_enable_d3d11) { if (angle_enable_d3d9 || angle_enable_d3d11) {
......
R"=====({"Rules":
[
{"Rule" : "Default Rule (i.e. use native driver)",
"AppChoice" : true, "NonChoice" : false
},
{"Rule" : "Supported application(s) (e.g. Maps on Google devices)",
"AppChoice" : true, "NonChoice" : true,
"Applications" :
[
{"AppName" : "com.google.android.apps.maps"}
],
"Devices" :
[
{"Manufacturer" : "Google"
}
]
}
]
}
)====="
...@@ -24,6 +24,16 @@ typedef enum ANGLEPreference { ...@@ -24,6 +24,16 @@ typedef enum ANGLEPreference {
ANGLE_PREFER_ANGLE = 2, ANGLE_PREFER_ANGLE = 2,
} ANGLEPreference; } ANGLEPreference;
// The Android EGL loader will call this function in order to determine whether
// to use ANGLE instead of a native OpenGL-ES (GLES) driver.
//
// Parameters:
// - appName - Java name of the application (e.g. "com.google.android.apps.maps")
// - deviceMfr - Device manufacturer, from the "ro.product.manufacturer"com.google.android" property
// - deviceModel - Device model, from the "ro.product.model"com.google.android" property
// - developerOption - Whether the "Developer Options" setting was set, and if so, how
// - appPreference - Whether the application expressed a preference, and if so, how
//
// TODO(ianelliott@google.com angleproject:2801): Revisit this function // TODO(ianelliott@google.com angleproject:2801): Revisit this function
// name/interface. Look at generalizing it and making it more "feature" // name/interface. Look at generalizing it and making it more "feature"
// oriented. // oriented.
......
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