summaryrefslogtreecommitdiff
path: root/libacryl
diff options
context:
space:
mode:
authorHyesoo Yu <hyesoo.yu@samsung.com>2019-05-27 11:00:24 +0900
committerCho KyongHo <pullip.cho@samsung.com>2020-02-24 18:21:34 -0800
commitd6d2c232d143f1d5848b8a7af4d893d765488199 (patch)
treed1826c49f3d8ad31f6d3a3c269f4bb0dc2257805 /libacryl
parent9b0097fcc1c647ffd032629bc750ad0bfad5c37c (diff)
libacryl: set background for SBWC encoding
The H/W has restriction that all destination region should be covered with layer's destination crop region, so, we cover the destination with background of bottom layer for SBWC encoding. Change-Id: I0a254320100fbfff47ccdf778bc1bd3153247437 Signed-off-by: Hyesoo Yu <hyesoo.yu@samsung.com>
Diffstat (limited to 'libacryl')
-rw-r--r--libacryl/acrylic_g2d9810.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libacryl/acrylic_g2d9810.cpp b/libacryl/acrylic_g2d9810.cpp
index 03ccc17..326773b 100644
--- a/libacryl/acrylic_g2d9810.cpp
+++ b/libacryl/acrylic_g2d9810.cpp
@@ -789,7 +789,13 @@ bool AcrylicCompositorG2D9810::executeG2D(int fence[], unsigned int num_fences,
if (num_fences > layercount + 1)
num_fences = layercount + 1;
- if (hasBackgroundColor()) {
+ bool hasBackground = hasBackgroundColor();
+
+ g2d_fmt *g2dfmt = halfmt_to_g2dfmt(halfmt_to_g2dfmt_tbl, len_halfmt_to_g2dfmt_tbl, getCanvas().getFormat());
+ if (g2dfmt && (g2dfmt->g2dfmt & G2D_DATAFORMAT_SBWC))
+ hasBackground = true;
+
+ if (hasBackground) {
layercount++;
if (layercount > getCapabilities().maxLayerCount()) {
@@ -815,7 +821,7 @@ bool AcrylicCompositorG2D9810::executeG2D(int fence[], unsigned int num_fences,
unsigned int baseidx = 0;
- if (hasBackgroundColor()) {
+ if (hasBackground) {
baseidx++;
prepareSolidLayer(getCanvas(), mTask.source[0], mTask.commands.source[0]);
}