This will fix the Vulkan orientation when the screen is rotated by having
the compositor do the corrections for us. However, it is suggested in the
Android Vulkan docs that for power reasons it may be better for the app
to get the needed rotation off of the VkAndroidSurface and then manually
adjust for this rotation in the rendering without the compositor doing any
corrections. This is something we can look into a later date as it would
require sending some info back from the VulkanWindowContext back to Skia
about what Matrix should be applied.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3052
Change-Id: I4d3d620ffcc77e607fce8d06b869c2912a61400c
Reviewed-on: https://skia-review.googlesource.com/3052
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
swapchainCreateInfo.pQueueFamilyIndices = nullptr;
}
- swapchainCreateInfo.preTransform = caps.currentTransform;;
+ swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
swapchainCreateInfo.compositeAlpha = composite_alpha;
swapchainCreateInfo.presentMode = mode;
swapchainCreateInfo.clipped = true;