gfxstream: nuke ResourceTracker::Impl
The big giant Vulkan singleton might have an underlying
implementation. However, it's unlikely we'll have more than
impl since it it's pretty giant. Nuke ResourceTracker::Impl
to reduce the number of layers one must traverse to modify
things.
Since this was mega-change, clang-format was also applied.
BUG=296903491
TEST=compile + guest ANGLE
Change-Id: Ia9609b64f200f99bc7fd03f0da9b881a31e7d635
diff --git a/guest/vulkan_enc/AndroidHardwareBuffer.h b/guest/vulkan_enc/AndroidHardwareBuffer.h
index bb0f3a6..b4085b6 100644
--- a/guest/vulkan_enc/AndroidHardwareBuffer.h
+++ b/guest/vulkan_enc/AndroidHardwareBuffer.h
@@ -14,15 +14,14 @@
// limitations under the License.
#pragma once
-#include "HostVisibleMemoryVirtualization.h"
-
#include <vulkan/vulkan.h>
+#include "../OpenglSystemCommon/Gralloc.h"
+#include "HostVisibleMemoryVirtualization.h"
+
// Structure similar to
// https://github.com/mesa3d/mesa/blob/master/src/intel/vulkan/anv_android.c
-class Gralloc;
-
namespace gfxstream {
namespace vk {
@@ -34,31 +33,23 @@
void updateMemoryTypeBits(uint32_t* memoryTypeBits, uint32_t colorBufferMemoryIndex);
VkResult getAndroidHardwareBufferPropertiesANDROID(
- Gralloc* grallocHelper,
- const AHardwareBuffer* buffer,
+ gfxstream::Gralloc* grallocHelper, const AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
-VkResult getMemoryAndroidHardwareBufferANDROID(
- Gralloc* grallocHelper,
- struct AHardwareBuffer **pBuffer);
+VkResult getMemoryAndroidHardwareBufferANDROID(gfxstream::Gralloc* grallocHelper,
+ struct AHardwareBuffer** pBuffer);
-VkResult importAndroidHardwareBuffer(
- Gralloc* grallocHelper,
- const VkImportAndroidHardwareBufferInfoANDROID* info,
- struct AHardwareBuffer **importOut);
+VkResult importAndroidHardwareBuffer(gfxstream::Gralloc* grallocHelper,
+ const VkImportAndroidHardwareBufferInfoANDROID* info,
+ struct AHardwareBuffer** importOut);
-VkResult createAndroidHardwareBuffer(
- Gralloc* grallocHelper,
- bool hasDedicatedImage,
- bool hasDedicatedBuffer,
- const VkExtent3D& imageExtent,
- uint32_t imageLayers,
- VkFormat imageFormat,
- VkImageUsageFlags imageUsage,
- VkImageCreateFlags imageCreateFlags,
- VkDeviceSize bufferSize,
- VkDeviceSize allocationInfoAllocSize,
- struct AHardwareBuffer **out);
+VkResult createAndroidHardwareBuffer(gfxstream::Gralloc* grallocHelper, bool hasDedicatedImage,
+ bool hasDedicatedBuffer, const VkExtent3D& imageExtent,
+ uint32_t imageLayers, VkFormat imageFormat,
+ VkImageUsageFlags imageUsage,
+ VkImageCreateFlags imageCreateFlags, VkDeviceSize bufferSize,
+ VkDeviceSize allocationInfoAllocSize,
+ struct AHardwareBuffer** out);
} // namespace vk
} // namespace gfxstream