diff options
| author | 2020-04-23 21:56:36 +0900 | |
|---|---|---|
| committer | 2020-04-28 09:20:05 +0900 | |
| commit | 204fb1f3771db8cd4a2629827197542e75d3c23f (patch) | |
| tree | 47afb8af0085146526dd8b1f44aa554ce9a6de52 | |
| parent | dc64a603d235f9c12ad598c9151af6ad8b23b3f6 (diff) | |
Change to using sysprop for libEGL and EGL_test
The configstore service was deprecated. So change to use sysprop
instead of configstore.
Bug: 124531214
Test: m -j && check reading system properties
Change-Id: I220094082a1d4ec4e7649ad0d9b614e0bcc334a6
| -rw-r--r-- | opengl/libs/Android.bp | 2 | ||||
| -rw-r--r-- | opengl/libs/EGL/egl_display.cpp | 8 | ||||
| -rw-r--r-- | opengl/tests/EGLTest/Android.bp | 2 | ||||
| -rw-r--r-- | opengl/tests/EGLTest/EGL_test.cpp | 7 | ||||
| -rw-r--r-- | services/surfaceflinger/Android.bp | 1 |
5 files changed, 11 insertions, 9 deletions
diff --git a/opengl/libs/Android.bp b/opengl/libs/Android.bp index e255b9d436..19b8a58012 100644 --- a/opengl/libs/Android.bp +++ b/opengl/libs/Android.bp @@ -154,6 +154,7 @@ cc_library_shared { "libnativebridge_lazy", "libnativeloader_lazy", "libutils", + "libSurfaceFlingerProp", ], static_libs: [ "libEGL_getProcAddress", @@ -165,6 +166,7 @@ cc_library_shared { symbol_file: "libEGL.map.txt", versions: ["29"], }, + header_libs: ["libsurfaceflinger_headers"], } cc_test { diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp index a58e87ca3e..d107d8e529 100644 --- a/opengl/libs/EGL/egl_display.cpp +++ b/opengl/libs/EGL/egl_display.cpp @@ -31,6 +31,7 @@ #include "egl_object.h" #include "egl_tls.h" +#include <SurfaceFlingerProperties.h> #include <android/dlext.h> #include <dlfcn.h> #include <graphicsenv/GraphicsEnv.h> @@ -361,9 +362,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) { // Note: CDD requires that devices supporting wide color and/or HDR color also support // the EGL_KHR_gl_colorspace extension. - bool wideColorBoardConfig = - getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasWideColorDisplay>( - false); + bool wideColorBoardConfig = android::sysprop::has_wide_color_display(false); // Add wide-color extensions if device can support wide-color if (wideColorBoardConfig && hasColorSpaceSupport) { @@ -373,8 +372,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) { "EGL_EXT_gl_colorspace_display_p3_passthrough "); } - bool hasHdrBoardConfig = - getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasHDRDisplay>(false); + bool hasHdrBoardConfig = android::sysprop::has_HDR_display(false); if (hasHdrBoardConfig && hasColorSpaceSupport) { // hasHDRBoardConfig indicates the system is capable of supporting HDR content. diff --git a/opengl/tests/EGLTest/Android.bp b/opengl/tests/EGLTest/Android.bp index 8bfe517812..e3912a84e6 100644 --- a/opengl/tests/EGLTest/Android.bp +++ b/opengl/tests/EGLTest/Android.bp @@ -25,6 +25,7 @@ cc_test { "liblog", "libutils", "libnativewindow", + "libSurfaceFlingerProp", ], include_dirs: [ @@ -34,5 +35,6 @@ cc_test { header_libs: [ "bionic_libc_platform_headers", + "libsurfaceflinger_headers", ], } diff --git a/opengl/tests/EGLTest/EGL_test.cpp b/opengl/tests/EGLTest/EGL_test.cpp index cca91c3a6f..510226d051 100644 --- a/opengl/tests/EGLTest/EGL_test.cpp +++ b/opengl/tests/EGLTest/EGL_test.cpp @@ -16,6 +16,7 @@ #include <gtest/gtest.h> +#include <SurfaceFlingerProperties.h> #include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h> #include <configstore/Utils.h> @@ -52,11 +53,9 @@ using namespace android::hardware::configstore::V1_0; #define METADATA_SCALE(x) (static_cast<EGLint>(x * EGL_METADATA_SCALING_EXT)) -static bool hasWideColorDisplay = - getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasWideColorDisplay>(false); +static bool hasWideColorDisplay = android::sysprop::has_wide_color_display(false); -static bool hasHdrDisplay = - getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasHDRDisplay>(false); +static bool hasHdrDisplay = android::sysprop::has_HDR_display(false); class EGLTest : public ::testing::Test { public: diff --git a/services/surfaceflinger/Android.bp b/services/surfaceflinger/Android.bp index fce0971917..01829371ea 100644 --- a/services/surfaceflinger/Android.bp +++ b/services/surfaceflinger/Android.bp @@ -286,6 +286,7 @@ cc_library_shared { export_shared_lib_headers: [ "android.hardware.graphics.common@1.2", "libhidlbase", + "libui", ], export_static_lib_headers: [ "SurfaceFlingerProperties", |