Vulkan: only report refreshDuration, not {min|max}RefreshDuration

Test: Manually tested with a modified cube demo, that reports the refresh
duration returned from this extension.

As part of discussions within Khronos, it was decided that
VK_GOOGLE_display_timing should only report one refresh duration for a display,
and assume that it's refresh rate is fixed (which is the case for our current
devices).

Change-Id: I772348281c18a36b02dcfe0519d1943e25a41f7c
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index 08eee37..338462a 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -197,21 +197,17 @@
           frame_timestamps_enabled(false) {
         timing.clear();
         ANativeWindow* window = surface.window.get();
-        int64_t min_rdur;
-        int64_t max_rdur;
-        native_window_get_refresh_cycle_period(
+        int64_t rdur;
+        native_window_get_refresh_cycle_duration(
             window,
-            &min_rdur,
-            &max_rdur);
-        min_refresh_duration = static_cast<uint64_t>(min_rdur);
-        max_refresh_duration = static_cast<uint64_t>(max_rdur);
+            &rdur);
+        refresh_duration = static_cast<uint64_t>(rdur);
     }
 
     Surface& surface;
     uint32_t num_images;
     bool frame_timestamps_enabled;
-    uint64_t min_refresh_duration;
-    uint64_t max_refresh_duration;
+    uint64_t refresh_duration;
 
     struct Image {
         Image() : image(VK_NULL_HANDLE), dequeue_fence(-1), dequeued(false) {}
@@ -356,7 +352,7 @@
                                 // timestamps to calculate the info that should
                                 // be reported to the user:
                                 //
-                                ti->calculate(swapchain.min_refresh_duration);
+                                ti->calculate(swapchain.refresh_duration);
                                 num_ready++;
                             }
                             break;
@@ -1288,8 +1284,7 @@
     Swapchain& swapchain = *SwapchainFromHandle(swapchain_handle);
     VkResult result = VK_SUCCESS;
 
-    pDisplayTimingProperties->minRefreshDuration = swapchain.min_refresh_duration;
-    pDisplayTimingProperties->maxRefreshDuration = swapchain.max_refresh_duration;
+    pDisplayTimingProperties->refreshDuration = swapchain.refresh_duration;
 
     return result;
 }