summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/driver.cpp
diff options
context:
space:
mode:
author Wei Wang <wvw@google.com> 2017-07-19 20:59:39 -0700
committer Wei Wang <wvw@google.com> 2017-07-20 14:57:23 -0700
commitf9b05eeb5f3b3ea92ea196f37a53df06b535690c (patch)
treefe9b9689ae2e12338b9ec6a56bd9eacc061ea606 /vulkan/libvulkan/driver.cpp
parent53e5aa93fa2855616b9691c5e1878f1db1464ace (diff)
SurfaceFlinger: Set property in StartPropertySetThread during init
This is similar to ag/1849505/ (see b/34499826), which by setting property in a separate thread, that CL aims to avoid slow initialization in SurfaceFlinger::init where SurfaceFlinger is waiting on property_service. There is new property_set() call added, and this CL is to move it to the StartPropertySetThread. Bug: 63844978 Test: on taimen with simulated delay ag/2562492/ Change-Id: I31547cb5e75f44eac635386b3cf345a44931c78f
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r--vulkan/libvulkan/driver.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index 7b985d1a7f..947a2f7bfe 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -31,6 +31,8 @@
#include <graphicsenv/GraphicsEnv.h>
#include <utils/Vector.h>
+#include "android-base/properties.h"
+
#include "driver.h"
#include "stubhal.h"
@@ -822,9 +824,9 @@ VkResult EnumerateDeviceExtensionProperties(
// conditionally add VK_GOOGLE_display_timing if present timestamps are
// supported by the driver:
- char timestamp_property[PROPERTY_VALUE_MAX];
- property_get("service.sf.present_timestamp", timestamp_property, "1");
- if (strcmp(timestamp_property, "1") == 0) {
+ const std::string timestamp_property("service.sf.present_timestamp");
+ android::base::WaitForPropertyCreation(timestamp_property);
+ if (android::base::GetBoolProperty(timestamp_property, true)) {
loader_extensions.push_back({
VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME,
VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION});