Fix queue transfer in VkHardwareBufferTest.

This test first imports an AHardwareBuffer into a VkImage that we wrap
in an SkSurface that we draw to. Then we drop the SkSurface and rewrap
the AHB in a new VkImage that is wrapped in an SkImage. It checks to
make sure these wrappings work and that we are seeing the data in the
SkImage that we drew in the SkSurface.

Since these VkImage's are coming from AHB, when we import them into
Vulkan the VkImage's are in the special EXTERNAL queue family. When we
do a draw Skia internally we move the VkImage to the normal graphics
queue. However, when we release the SkSurface we need to transition
VkImage back to the EXTERNAL queue. We use to do this automatically
when the GrVkImage was getting destroyed, but it ended up causing us
to record these transfer commands into a command buffer that clients
were unaware they need to tell skia to flush/submit. Thus we moved to
a system where clients explicitly tell us to do these transitions.
This test just never got updated to the new system and was relying on
the old behavior.

Bug: b/241943206
Change-Id: I6033efe86776c6879d7fa14abe053585c439b318
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/567636
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Nicolette Prevost <nicolettep@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
1 file changed