Commit Graph

16 Commits

Author SHA1 Message Date
Alec Mouri
a5a0c962b6 [HWUI] Minor ANativeWindow usage cleanup
* Remove unused header in EglManager
* Rename usage of rotation flags to use the public names.

Bug: 137012798
Test: builds
Change-Id: Ia603e8d74c6ba51f77e352333d1e82816582d827
2019-12-23 08:59:57 -08:00
Yiwei Zhang
dab6ecd6ce HWUI-VK: Use auto prerotation for Vulkan backend
The consumer driven resizing now works as below:
1. Query the cached transform hint for this draw cycle
2. dequeuBuffer first to get the actual size
3. Cancel the pre-rotation done on the buffer
4. Update logical window size according to the transform

Bug: 136110987
Test: manually test split screen with resizing and rotation
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: Ia7f1a53fd761b90cb3ff429086a060d48e40919c
2019-06-27 15:19:45 -07:00
Yiwei Zhang
68daf67e66 HWUI-VK: connect and set native window before any queries
Since Vulkan WSI has been removed from HWUI Vulkan backend, upon VulkanSurface
creation, we should connect to native window first.

Bug: 136110987
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: I005a8bf22cce0364f240e09fceeb275a6f36aa77
2019-06-26 22:39:45 -07:00
Yiwei Zhang
bd363c94ff HWUI-VK: Decouple hwui Vulkan backend from Vulkan WSI APIs
1. Android support all transforms as exposed by client composition.
2. Properly exposing min/max image size is tracked in http://b/134182502.
3. Current image size and max buffer count are cached in Surface already.
4. Remove surface support check since hwui does not have YUV + CPU consumer.
5. Since HWUI must require those image usage flags, just use them directly,
   and those are always supported by Vulkan driver and enforced by cts.

Bug: 136110987
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: I89bd9afb69a46e3deca09890ce6348c6b61edddf
2019-06-26 17:10:28 -07:00
Yiwei Zhang
6bbcedacf5 HWUI-VK: Fix initial window transform
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: I5783be3cfe47597b7931b5605579edb6e189a87e
2019-06-26 17:09:27 -07:00
Greg Daniel
cdfc90231c Remove workaround in VulkanSurface for missing vendor flag.
Test: manual building and testing
Bug: b/128923272
Change-Id: I6be67fddbbf06d4eb7efe316f7e6fd12157e2852
2019-05-14 09:25:41 -04:00
TreeHugger Robot
8d8d704cf7 Merge "Fix set_buffers_damage in VulkanSurface" into qt-dev 2019-04-15 21:00:08 +00:00
John Reck
08ca2a2560 Merge "Support render-ahead in vulkan" into qt-dev 2019-04-15 18:20:28 +00:00
John Reck
0fa0cbcade Support render-ahead in vulkan
Bug: 127822449
Test: verified render_ahead working with skiavk
Change-Id: Iae1b227a763f6def035057f38cca4b0ab65c7e82
2019-04-12 13:33:25 -07:00
John Reck
321d8e538d Fix set_buffers_damage in VulkanSurface
Fixes: 130363483
Test: `setprop debug.hwui.renderer skiavk` and ensure
      surface damage in dumpsys surfaceflinger is expected
      in portrait & landscape orientations.

Change-Id: I973c47038e534c86f38112de7b863477d982d150
2019-04-12 13:06:11 -07:00
Derek Sollenberger
4670126b86 Respect the hardware buffer usage flags set by the consumer.
Test: CtsUiRenderingTestCases
Bug: 130121294
Change-Id: Ie77dee104fa8935978dfd6c0c506d2995f20cd79
2019-04-08 20:31:16 +00:00
Greg Daniel
2173f1890c Add workaround for qualcomm vulkan AHDARDWAREBUFFER_USAGE_VENDER_0
Test: manual building and testing on device. Bugs related to lack of
flag go away.
Bug: 128923272
Change-Id: I2457988c097d73020162947c346a8716d373185e
2019-04-02 13:21:28 +00:00
John Reck
ac513c2fde Fix NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS handling
Fixes: 123541940
Test: CTS HardwareRendererTests#testLotsOfBuffers
Change-Id: I5d96e615f552c4faa0e6dcaaaa828c871eaf6c8e
2019-03-28 16:57:38 -07:00
Stan Iliev
bc5f06bdaa Fix crash after dequeueNativeBuffer fails
Anytime dequeueNativeBuffer fails, it sets mDequeuedIndex to -1.
This is causing a crash latter, when getCurrentSkSurface tries
to index mNativeBuffers[mDequeuedIndex].
This CL removes mDequeuedIndex and improves Vulkan swapchain
error handling.

Test: Ran Camera app
Bug: 129024275
Change-Id: Ieeb685c3a1b33f23ce2334d286199a44ace53165
2019-03-26 15:14:34 -04:00
Derek Sollenberger
31c1b82ad7 Use VkAndroidHardwareBufferUsageANDROID to compute HWUI usage flags
Bug: 128923272
Test: atest CtsUiRenderingTestCases
Change-Id: I27db1a35b77fb654ab738520bee6734f6a62cc4f
2019-03-21 13:24:26 -04:00
Derek Sollenberger
a19b71a54a Directly manage buffer presentation in Vulkan using AHardwareBuffers.
Instead of relying on Vulkan swapchains this CL enables HWUI to directly
manage the native window.  This allows us to preallocate buffers using
our own strategy as well as having no longer having to jump through an
unecessary translation layer that resulted in code that was hard to
reason about and also introduced inefficiencies.

Bug: 123541940
Bug: 119687951
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: I7e5930748795e7ca4a998ab2c608c3c9b6363037
2019-03-08 09:25:35 -05:00