Loading services/surfaceflinger/SurfaceFlinger.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,14 @@ void SurfaceFlinger::init() { Mutex::Autolock _l(mStateLock); // Inform native graphics APIs whether the present timestamp is supported: if (getHwComposer().hasCapability( HWC2::Capability::PresentFenceIsNotReliable)) { property_set(kTimestampProperty, "0"); } else { property_set(kTimestampProperty, "1"); } if (useVrFlinger) { auto vrFlingerRequestDisplayCallback = [this] (bool requestDisplay) { mVrFlingerRequestsDisplay = requestDisplay; Loading services/surfaceflinger/SurfaceFlinger.h +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ private: enum { LOG_FRAME_STATS_PERIOD = 30*60*60 }; static const size_t MAX_LAYERS = 4096; static constexpr const char* kTimestampProperty = "service.sf.present_timestamp"; // We're reference counted, never destroy SurfaceFlinger directly virtual ~SurfaceFlinger(); Loading services/surfaceflinger/SurfaceFlinger_hwc1.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,9 @@ void SurfaceFlinger::init() { LOG_ALWAYS_FATAL_IF(mEGLContext == EGL_NO_CONTEXT, "couldn't create EGLContext"); // Inform native graphics APIs that the present timestamp is NOT supported: property_set(kTimestampProperty, "0"); // initialize our non-virtual displays for (size_t i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) { DisplayDevice::DisplayType type((DisplayDevice::DisplayType)i); Loading vulkan/libvulkan/driver.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -817,9 +817,6 @@ VkResult EnumerateDeviceExtensionProperties( loader_extensions.push_back({ VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION}); loader_extensions.push_back({ VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION}); if (kEnableUnratifiedExtensions) { // conditionally add shared_presentable_image if supportable Loading @@ -832,6 +829,16 @@ 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) { loader_extensions.push_back({ VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION}); } // enumerate our extensions first if (!pLayerName && pProperties) { uint32_t count = std::min( Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,14 @@ void SurfaceFlinger::init() { Mutex::Autolock _l(mStateLock); // Inform native graphics APIs whether the present timestamp is supported: if (getHwComposer().hasCapability( HWC2::Capability::PresentFenceIsNotReliable)) { property_set(kTimestampProperty, "0"); } else { property_set(kTimestampProperty, "1"); } if (useVrFlinger) { auto vrFlingerRequestDisplayCallback = [this] (bool requestDisplay) { mVrFlingerRequestsDisplay = requestDisplay; Loading
services/surfaceflinger/SurfaceFlinger.h +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ private: enum { LOG_FRAME_STATS_PERIOD = 30*60*60 }; static const size_t MAX_LAYERS = 4096; static constexpr const char* kTimestampProperty = "service.sf.present_timestamp"; // We're reference counted, never destroy SurfaceFlinger directly virtual ~SurfaceFlinger(); Loading
services/surfaceflinger/SurfaceFlinger_hwc1.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,9 @@ void SurfaceFlinger::init() { LOG_ALWAYS_FATAL_IF(mEGLContext == EGL_NO_CONTEXT, "couldn't create EGLContext"); // Inform native graphics APIs that the present timestamp is NOT supported: property_set(kTimestampProperty, "0"); // initialize our non-virtual displays for (size_t i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) { DisplayDevice::DisplayType type((DisplayDevice::DisplayType)i); Loading
vulkan/libvulkan/driver.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -817,9 +817,6 @@ VkResult EnumerateDeviceExtensionProperties( loader_extensions.push_back({ VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION}); loader_extensions.push_back({ VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION}); if (kEnableUnratifiedExtensions) { // conditionally add shared_presentable_image if supportable Loading @@ -832,6 +829,16 @@ 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) { loader_extensions.push_back({ VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION}); } // enumerate our extensions first if (!pLayerName && pProperties) { uint32_t count = std::min( Loading