Change the conditions of layer as translucent
Only the mSidebandStream and mActiveBuffer are both null,the layer
is consider as translucent.Or else ,it will cause Composition::sideband
layer can not call into clear ClientTarget when SurfaceFlinger
doComposeSurfaces
Issue: 234427
Test: Live Channel
Change-Id: I19aeb7ac838baefe4b9b9417f87dd8a7d9b131b0
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
old mode 100644
new mode 100755
index d13b6db..0de5abc
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1271,9 +1271,9 @@
bool Layer::isOpaque(const Layer::State& s) const
{
- // if we don't have a buffer yet, we're translucent regardless of the
+ // if we don't have a buffer or sidebandStream yet, we're translucent regardless of the
// layer's opaque flag.
- if (mActiveBuffer == 0) {
+ if ((mSidebandStream == nullptr) && (mActiveBuffer == nullptr)) {
return false;
}