Hash :
c4e0a1e5
Author :
Date :
2018-11-28T16:08:11
Revert "Enhance ANGLE for Android Developer Options" This reverts commit fdbdb2b247ffa4cf66bc2cd3a5bb45a056bd88a3. Reason for revert: I didn't mean to land this quite yet, since we are still working on the Android side of things. It seems doing CQ+2 merges it while I was trying for just a dry run while replying to Jamie's comments with updates (after checking with Boulder folks, I want CQ+1 next time). Once the Android changes are ready, I'll work on getting this landed again. Original change's description: > Enhance ANGLE for Android Developer Options > > Update ANGLE Developer Options > > Update ANGLE developer options to allow selecting the OpenGL driver > (default, ANGLE, native) for each app as well as forcing ANGLE for all > apps. > > Bug: angleproject:2962 > Test: Verify the default/ANGLE/native values are saved and applied and > used by the loader. > > Change-Id: I6041e7e49ca5cc65f90fc8ae6f1b084e4639d769 > Reviewed-on: https://chromium-review.googlesource.com/c/1330315 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org,cnorthrop@google.com,tobine@google.com,courtneygo@google.com,ianelliott@google.com,timvp@google.com Change-Id: If3a4e917973c56b858244a0ca7f1b164143524f5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2962 Reviewed-on: https://chromium-review.googlesource.com/c/1354099 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
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
//
// Copyright 2018 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.
//
// feature_support_util.h: Internal-to-ANGLE header file for feature-support utilities.
#ifndef FEATURE_SUPPORT_UTIL_H_
#define FEATURE_SUPPORT_UTIL_H_
#include "angle_feature_support_util.h"
#ifdef __cplusplus
extern "C" {
#endif
// The following are internal versions supported by the current feature-support-utility API.
constexpr unsigned int kFeatureVersion_LowestSupported = 0;
constexpr unsigned int kFeatureVersion_HighestSupported = 1;
// The following is the "version 0" external interface that the Android EGL loader used. It is
// deprecated and will soon be obsoleted. It was never declared in the shared header file.
// TODO(ianelliott@google.com angleproject:2801): Revisit this enum. Make it
// strongly typed, and look at renaming it and its values.
typedef enum ANGLEPreference
{
ANGLE_NO_PREFERENCE = 0,
ANGLE_PREFER_NATIVE = 1,
ANGLE_PREFER_ANGLE = 2,
} 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
// name/interface. Look at generalizing it and making it more "feature"
// oriented.
ANGLE_EXPORT bool ANGLEUseForApplication(const char *appName,
const char *deviceMfr,
const char *deviceModel,
ANGLEPreference developerOption,
ANGLEPreference appPreference);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // FEATURE_SUPPORT_UTIL_H_