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

Commit 85ccc32b authored by Ian Elliott's avatar Ian Elliott Committed by android-build-merger
Browse files

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

am: 6a1e0e47

Change-Id: Iaaf72e2a65003649cd8708de32919631c5962ec6
parents 849ea70c 6a1e0e47
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;
}