Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf7c96e5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Have vkGetRefreshCycleDurationGOOGLE query SF every time." into qt-dev

parents 2494c954 3568bfe0
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -222,6 +222,15 @@ struct Swapchain {
            window,
            &refresh_duration);
    }
    uint64_t get_refresh_duration()
    {
        ANativeWindow* window = surface.window.get();
        native_window_get_refresh_cycle_duration(
            window,
            &refresh_duration);
        return static_cast<uint64_t>(refresh_duration);

    }

    Surface& surface;
    uint32_t num_images;
@@ -1730,8 +1739,7 @@ VkResult GetRefreshCycleDurationGOOGLE(
    Swapchain& swapchain = *SwapchainFromHandle(swapchain_handle);
    VkResult result = VK_SUCCESS;

    pDisplayTimingProperties->refreshDuration =
            static_cast<uint64_t>(swapchain.refresh_duration);
    pDisplayTimingProperties->refreshDuration = swapchain.get_refresh_duration();

    return result;
}