OSDN Git Service

Merge "Ignore VK_KHR_incremental_present hint for MAILBOX."
authorTreeHugger Robot <treehugger-gerrit@google.com>
Tue, 14 Feb 2017 19:45:36 +0000 (19:45 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 14 Feb 2017 19:45:37 +0000 (19:45 +0000)
1  2 
vulkan/libvulkan/swapchain.cpp

@@@ -176,10 -191,14 +176,13 @@@ enum { MAX_TIMING_INFOS = 10 }
  enum { MIN_NUM_FRAMES_AGO = 5 };
  
  struct Swapchain {
-     Swapchain(Surface& surface_, uint32_t num_images_)
+     Swapchain(Surface& surface_,
+               uint32_t num_images_,
+               VkPresentModeKHR present_mode)
          : surface(surface_),
            num_images(num_images_),
+           mailbox_mode(present_mode == VK_PRESENT_MODE_MAILBOX_KHR),
            frame_timestamps_enabled(false) {
 -        timing.clear();
          ANativeWindow* window = surface.window.get();
          int64_t rdur;
          native_window_get_refresh_cycle_duration(