summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaruna Ramkumar <rkaruna@google.com>2023-03-22 17:52:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-03-22 17:52:11 +0000
commitc76aa68a615afcaca98d341488725e2ae1988316 (patch)
tree005df42b32e11a66999581344d7c351ddc36a8ad
parenteb723a826420697fde3dc074fd6ca548c8405c6d (diff)
parent7a258f11933e15d6b889a0a564bde640470f7901 (diff)
Merge "libacryl: Check color fill layer if present" into udc-dev
-rw-r--r--libacryl/acrylic_g2d.h7
-rw-r--r--libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/libacryl/acrylic_g2d.h b/libacryl/acrylic_g2d.h
index e377017..6ed5942 100644
--- a/libacryl/acrylic_g2d.h
+++ b/libacryl/acrylic_g2d.h
@@ -70,7 +70,12 @@ public:
return;
for (unsigned int i = 0; i < mCmds->layer_count; i++) {
- unsigned int idx = (mCmds->layer_hdr_mode[i].offset >> 8) - 2;
+ unsigned int idx;
+
+ if (mWriter->hasColorFillLayer())
+ idx = (mCmds->layer_hdr_mode[i].offset >> 8) - 3;
+ else
+ idx = (mCmds->layer_hdr_mode[i].offset >> 8) - 2;
// If premultiplied alpha values are de-premultied before HDR conversion,
// it should be multiplied again after the conversion. But some of the HDR processors
diff --git a/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h b/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h
index 02b863a..aefed60 100644
--- a/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h
+++ b/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h
@@ -39,6 +39,7 @@ public:
virtual void setTargetDisplayLuminance(unsigned int __unused min, unsigned int __unused max) { };
virtual struct g2d_commandlist *getCommands() = 0;
virtual void putCommands(struct g2d_commandlist __unused *commands) { };
+ virtual bool hasColorFillLayer(void) { return false; }
};
#endif/* __LIBACRYL_PLUGIN_G2D_HDR_H__ */