summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaran Bhagoji <karan.rb@samsung.com>2023-03-01 17:04:32 -0800
committerKaruna Ramkumar <rkaruna@google.com>2023-03-21 14:31:27 -0700
commit7a258f11933e15d6b889a0a564bde640470f7901 (patch)
treed3e45fc8684aa9000bc7f1a8199eb241a3941124
parentbeae9743b5b505eb30f0d24332a195b227ad8466 (diff)
libacryl: Check color fill layer if present
Bug: 225772892 Change-Id: I5656e580d13f04cd85882fc3f404a3ede83f4153 Signed-off-by: Karan Bhagoji <karan.rb@samsung.com>
-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__ */