diff options
author | Greg Daniel <egdaniel@google.com> | 2016-10-06 13:57:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-06 18:57:23 +0000 |
commit | e897b974714db06fd6977d57aafbfb01799c33a3 (patch) | |
tree | f47e70488a5cc71cf6eaaf9d5002f2851c83cf7d | |
parent | 1356978f15a4dc36928353a6fca4cbd6c40abce5 (diff) |
Fix Vulkan orientation during screne rotations
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>
-rw-r--r-- | tools/viewer/sk_app/VulkanWindowContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp index 8d7dceeb8c..dc93623ade 100644 --- a/tools/viewer/sk_app/VulkanWindowContext.cpp +++ b/tools/viewer/sk_app/VulkanWindowContext.cpp @@ -220,7 +220,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height, 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; |