summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-04-28 00:03:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-04-28 00:03:49 +0000
commita02be27f6d7804ea32c47cb0e70bdb7fa9c3889d (patch)
treec40977991e43eaf10c10ac01fed3962d36072053
parentc50b604460d60c84862b08566f35c789ab0457a3 (diff)
parentbc37dd56361b17e3e9815bc6d43b114c659b5a41 (diff)
Merge "Change to using sysprop for libvulkan" into rvc-dev
-rw-r--r--vulkan/libvulkan/Android.bp2
-rw-r--r--vulkan/libvulkan/driver.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/vulkan/libvulkan/Android.bp b/vulkan/libvulkan/Android.bp
index 018f2004cd..f69de1f324 100644
--- a/vulkan/libvulkan/Android.bp
+++ b/vulkan/libvulkan/Android.bp
@@ -79,6 +79,7 @@ cc_library_shared {
"hwvulkan_headers",
"libnativeloader-headers",
"vulkan_headers",
+ "libsurfaceflinger_headers",
],
export_header_lib_headers: ["vulkan_headers"],
shared_libs: [
@@ -100,6 +101,7 @@ cc_library_shared {
"libnativeloader_lazy",
"libnativewindow",
"android.hardware.graphics.common@1.0",
+ "libSurfaceFlingerProp",
],
static_libs: ["libgrallocusage"],
}
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index a7ec4aed1d..a5f0c9f803 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -23,9 +23,10 @@
#include <stdlib.h>
#include <string.h>
+#include <SurfaceFlingerProperties.h>
+#include <android-base/properties.h>
#include <android/dlext.h>
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
-#include <android-base/properties.h>
#include <configstore/Utils.h>
#include <cutils/properties.h>
#include <graphicsenv/GraphicsEnv.h>
@@ -959,9 +960,7 @@ VkResult EnumerateDeviceExtensionProperties(
VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME,
VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION});
- bool hdrBoardConfig =
- getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasHDRDisplay>(
- false);
+ bool hdrBoardConfig = android::sysprop::has_HDR_display(false);
if (hdrBoardConfig) {
loader_extensions.push_back({VK_EXT_HDR_METADATA_EXTENSION_NAME,
VK_EXT_HDR_METADATA_SPEC_VERSION});