summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/VulkanManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/VulkanManager.h')
-rw-r--r--libs/hwui/renderthread/VulkanManager.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h
index d225b3fc4ec0..c319c9ec209f 100644
--- a/libs/hwui/renderthread/VulkanManager.h
+++ b/libs/hwui/renderthread/VulkanManager.h
@@ -37,13 +37,14 @@ public:
private:
friend class VulkanManager;
struct BackbufferInfo {
- uint32_t mImageIndex; // image this is associated with
- VkSemaphore mAcquireSemaphore; // we signal on this for acquisition of image
- VkSemaphore mRenderSemaphore; // we wait on this for rendering to be done
- VkCommandBuffer mTransitionCmdBuffers[2]; // to transition layout between present and render
+ uint32_t mImageIndex; // image this is associated with
+ VkSemaphore mAcquireSemaphore; // we signal on this for acquisition of image
+ VkSemaphore mRenderSemaphore; // we wait on this for rendering to be done
+ VkCommandBuffer
+ mTransitionCmdBuffers[2]; // to transition layout between present and render
// We use these fences to make sure the above Command buffers have finished their work
// before attempting to reuse them or destroy them.
- VkFence mUsageFences[2];
+ VkFence mUsageFences[2];
};
struct ImageInfo {
@@ -58,11 +59,11 @@ private:
VkSurfaceKHR mVkSurface = VK_NULL_HANDLE;
VkSwapchainKHR mSwapchain = VK_NULL_HANDLE;
- BackbufferInfo* mBackbuffers;
+ BackbufferInfo* mBackbuffers = nullptr;
uint32_t mCurrentBackbufferIndex;
uint32_t mImageCount;
- VkImage* mImages;
+ VkImage* mImages = nullptr;
ImageInfo* mImageInfos;
uint16_t mCurrentTime = 0;
};
@@ -118,11 +119,16 @@ private:
VulkanSurface::BackbufferInfo* getAvailableBackbuffer(VulkanSurface* surface);
// simple wrapper class that exists only to initialize a pointer to NULL
- template <typename FNPTR_TYPE> class VkPtr {
+ template <typename FNPTR_TYPE>
+ class VkPtr {
public:
VkPtr() : fPtr(NULL) {}
- VkPtr operator=(FNPTR_TYPE ptr) { fPtr = ptr; return *this; }
+ VkPtr operator=(FNPTR_TYPE ptr) {
+ fPtr = ptr;
+ return *this;
+ }
operator FNPTR_TYPE() const { return fPtr; }
+
private:
FNPTR_TYPE fPtr;
};
@@ -183,4 +189,3 @@ private:
} /* namespace android */
#endif /* VULKANMANAGER_H */
-