diff options
author | Stan Iliev <stani@google.com> | 2018-12-04 10:07:21 -0500 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2018-12-04 11:23:21 -0500 |
commit | 987a80c0cac883f571d3015d0a49cfdea0808d09 (patch) | |
tree | c7341e9deb452e1b5aaf4276f0dc164832c60d7f /libs/hwui/renderthread/VulkanManager.h | |
parent | 17646e2235e090a71518a018ac861b27ad07052a (diff) |
Set color space on Vulkan render target surface
Test: Pass UiRendering tests with Vulkan pipeline
Bug: 116117654
Bug: 111436479
Change-Id: Id58a8a93c6f311402273b1a9e3606c9732f55aec
Diffstat (limited to 'libs/hwui/renderthread/VulkanManager.h')
-rw-r--r-- | libs/hwui/renderthread/VulkanManager.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h index 8594a1bd4339..d67d2c81e95c 100644 --- a/libs/hwui/renderthread/VulkanManager.h +++ b/libs/hwui/renderthread/VulkanManager.h @@ -38,8 +38,8 @@ class RenderThread; class VulkanSurface { public: - VulkanSurface(ColorMode colorMode, ANativeWindow* window) - : mColorMode(colorMode), mNativeWindow(window) {} + VulkanSurface(ColorMode colorMode, ANativeWindow* window, sk_sp<SkColorSpace> colorSpace) + : mColorMode(colorMode), mNativeWindow(window), mColorSpace(colorSpace) {} sk_sp<SkSurface> getBackBufferSurface() { return mBackbuffer; } @@ -79,6 +79,7 @@ private: ANativeWindow* mNativeWindow; int mWindowWidth = 0; int mWindowHeight = 0; + sk_sp<SkColorSpace> mColorSpace; }; // This class contains the shared global Vulkan objects, such as VkInstance, VkDevice and VkQueue, @@ -96,7 +97,8 @@ public: // Given a window this creates a new VkSurfaceKHR and VkSwapchain and stores them inside a new // VulkanSurface object which is returned. - VulkanSurface* createSurface(ANativeWindow* window, ColorMode colorMode); + VulkanSurface* createSurface(ANativeWindow* window, ColorMode colorMode, + sk_sp<SkColorSpace> surfaceColorSpace); // Destroy the VulkanSurface and all associated vulkan objects. void destroySurface(VulkanSurface* surface); |