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.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h
index c211f5d2b5d7..7c59b6d340d2 100644
--- a/libs/hwui/renderthread/VulkanManager.h
+++ b/libs/hwui/renderthread/VulkanManager.h
@@ -26,6 +26,7 @@
#include <ui/Fence.h>
#include <utils/StrongPointer.h>
#include <vk/GrVkBackendContext.h>
+#include "IRenderPipeline.h"
class GrVkExtensions;
@@ -37,7 +38,7 @@ class RenderThread;
class VulkanSurface {
public:
- VulkanSurface() {}
+ VulkanSurface(ColorMode colorMode) : mColorMode(colorMode) {}
sk_sp<SkSurface> getBackBufferSurface() { return mBackbuffer; }
@@ -73,6 +74,7 @@ private:
VkImage* mImages = nullptr;
ImageInfo* mImageInfos;
uint16_t mCurrentTime = 0;
+ ColorMode mColorMode;
};
// This class contains the shared global Vulkan objects, such as VkInstance, VkDevice and VkQueue,
@@ -90,7 +92,7 @@ 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);
+ VulkanSurface* createSurface(ANativeWindow* window, ColorMode colorMode);
// Destroy the VulkanSurface and all associated vulkan objects.
void destroySurface(VulkanSurface* surface);
@@ -118,10 +120,6 @@ public:
// Creates a fence that is signaled, when all the pending Vulkan commands are flushed.
status_t createReleaseFence(sp<Fence>& nativeFence);
- // TODO(b/115636873): Handle composition preference.
- SkColorType getSurfaceColorType() const { return SkColorType::kN32_SkColorType; }
- sk_sp<SkColorSpace> getSurfaceColorSpace() { return SkColorSpace::MakeSRGB(); }
-
private:
friend class RenderThread;