Minor tweaks to VK_GOOGLE_display_timing
Test: Manually tested with a modified cube demo, that changes its timing as a
result of the data returned from this extension.
Change-Id: I80795ae9e10e285e00382bd565f22f2bfdb37177
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index 984016e..af56650 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -108,15 +108,18 @@
class TimingInfo {
public:
- TimingInfo() {}
- TimingInfo(const VkPresentTimeGOOGLE* qp) {
- vals_.presentID = qp->presentID;
- vals_.desiredPresentTime = qp->desiredPresentTime;
- timestamp_desired_present_time_ = 0;
- timestamp_actual_present_time_ = 0;
- timestamp_render_complete_time_ = 0;
- timestamp_composition_latch_time_ = 0;
- }
+ TimingInfo()
+ : vals_{0, 0, 0, 0, 0},
+ timestamp_desired_present_time_(0),
+ timestamp_actual_present_time_(0),
+ timestamp_render_complete_time_(0),
+ timestamp_composition_latch_time_(0) {}
+ TimingInfo(const VkPresentTimeGOOGLE* qp)
+ : vals_{qp->presentID, qp->desiredPresentTime, 0, 0, 0},
+ timestamp_desired_present_time_(0),
+ timestamp_actual_present_time_(0),
+ timestamp_render_complete_time_(0),
+ timestamp_composition_latch_time_(0) {}
bool ready() {
return (timestamp_desired_present_time_ &&
timestamp_actual_present_time_ &&