diff options
author | Peiyong Lin <lpy@google.com> | 2018-12-11 07:56:07 -0800 |
---|---|---|
committer | Peiyong Lin <lpy@google.com> | 2018-12-15 09:35:25 -0800 |
commit | 3bff13550380f02e30f1ae77f2497d9ec89b0ec4 (patch) | |
tree | 75b2fb1ce48d7a93fa4d5e0bf5a0db31f9ab8d64 /libs/hwui/DeviceInfo.h | |
parent | 78c2a0de5793fd997ee716de7f4845bfa7c6a7c3 (diff) |
[HWUI] Remove hardcoding around wide color gamut.
Previously we hardcode wide color gamut in HWUI as scRGB color space with FP16
pixel format. However, the hardware composer doesn't support this combination.
This patch plumbs wide color gamut composition preference from composer API to
HWUI such that HWUI can now pick the combination of color space and pixel
format for the surface.
BUG: 111436479
Test: Build, flash and boot, verify with a demo app.
Change-Id: I7a8b4d8deca72ef40069dba9d23a3f5e90dbfe5a
Diffstat (limited to 'libs/hwui/DeviceInfo.h')
-rw-r--r-- | libs/hwui/DeviceInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/DeviceInfo.h b/libs/hwui/DeviceInfo.h index 595621573e6e..9bcc8e8a3dbe 100644 --- a/libs/hwui/DeviceInfo.h +++ b/libs/hwui/DeviceInfo.h @@ -16,6 +16,7 @@ #ifndef DEVICEINFO_H #define DEVICEINFO_H +#include <SkImageInfo.h> #include <ui/DisplayInfo.h> #include "utils/Macros.h" @@ -37,6 +38,9 @@ public: // context or if you are using the HWUI_NULL_GPU int maxTextureSize() const; const DisplayInfo& displayInfo() const { return mDisplayInfo; } + SkColorSpace::Gamut getWideColorGamut() const { return mWideColorGamut; } + sk_sp<SkColorSpace> getWideColorSpace() const { return mWideColorSpace; } + SkColorType getWideColorType() const { return mWideColorType; } private: friend class renderthread::RenderThread; @@ -46,6 +50,9 @@ private: int mMaxTextureSize; DisplayInfo mDisplayInfo; + SkColorSpace::Gamut mWideColorGamut; + sk_sp<SkColorSpace> mWideColorSpace; + SkColorType mWideColorType; }; } /* namespace uirenderer */ |