summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2020-08-13 16:53:30 -0400
committerDerek Sollenberger <djsollen@google.com>2020-08-17 13:22:34 -0400
commit802fefa881b1ac135d00655b9bec22cbc7a64509 (patch)
tree035ed0ad4f2dcf83bad3934dad86f440f7319161 /libs/hwui/renderthread/RenderThread.h
parenta10867062213cc0d47e1d63fc8c19aed55266457 (diff)
Share Vulkan resources between RenderThread and HardwareBitmapUploader
The VkInstance and VkDevice are constructs that can be shared between threads and avoid the extra driver allocations associated with them. This CL also fixes a bug where Vulkan uploads were occuring on the thread that invoked the upload and not occuring on the upload thread. Bug: b/162628999 Test: atest CtsUiRenderingTestCases Change-Id: I0289938333e2c3dafcc2ce18e72dca3acf4d5b79
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r--libs/hwui/renderthread/RenderThread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index b8ce55650516..d7dc00b8a5c1 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -110,7 +110,7 @@ public:
void setGrContext(sk_sp<GrDirectContext> cxt);
CacheManager& cacheManager() { return *mCacheManager; }
- VulkanManager& vulkanManager() { return *mVkManager; }
+ VulkanManager& vulkanManager();
sk_sp<Bitmap> allocateHardwareBitmap(SkBitmap& skBitmap);
void dumpGraphicsMemory(int fd);
@@ -188,7 +188,7 @@ private:
sk_sp<GrDirectContext> mGrContext;
CacheManager* mCacheManager;
- VulkanManager* mVkManager;
+ sp<VulkanManager> mVkManager;
};
} /* namespace renderthread */