SurfaceFlinger: fix no small window displayed in PIP mode of DTVKIT [1/1]
Bug:146758432
PD#SWPL-39338
Problem:
Dtvkit, no small window displayed in pip mode
Solution:
porting from I82d81ded
For surfaceview of tv sideband, there is no activeBuffer in bufferqueue.
ClientCompostion layer if above it need plug holes for this case.
Verify:
ohm
Change-Id: Id92c3856eb8eb5a14813336f723d30b7a17514b1
Signed-off-by: Tianhua Sun <tianhua.sun@amlogic.com>
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index f0b0200..df26a3d 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -176,7 +176,14 @@
if (!holes.isEmpty()) {
targetSettings.clearRegion.orSelf(holes);
}
- return std::nullopt;
+
+ if (mSidebandStream != nullptr) {
+ // For surfaceview of tv sideband, there is no activeBuffer
+ // in bufferqueue, we need return LayerSettings.
+ return result;
+ } else {
+ return std::nullopt;
+ }
}
bool blackOutLayer = (isProtected() && !targetSettings.supportsProtectedContent) ||
(isSecure() && !targetSettings.isSecure);