swapchain: add condition to report mailbox mode

The current GetPhysicalDeviceSurfacePresentModesKHR() will by default
make VK_PRESENT_MODE_MAILBOX_KHR available to consumers. However, that
mode should not be reported when NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS +
1 < NATIVE_WINDOW_MAX_BUFFER_COUNT, in which case setAsyncMode(true)
will always fail.

Test: adb shell setprop debug.hwui.renderer skiavk
Test: click on apps in Play store, no setAsyncMode errors
Bug: b/73495125
Change-Id: Ida3bf471c6768b2e83dd8707198ed4f0b68514ad
1 file changed