Bug 832383 - Don't render semitransparent color layers in HwcComposer2D. r=mwu

The hardware composer does not support them.

Also don't skip rendering fully transparent layers. The GPU compositor
does not seem to ignore them completely.
This commit is contained in:
Diego Wilson 2013-04-29 17:20:51 -07:00
parent 9a6abf29f2
commit 91050f2f19

View File

@ -297,11 +297,7 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer,
}
float opacity = aLayer->GetEffectiveOpacity();
if (opacity <= 0) {
LOGD("Layer is fully transparent so skip rendering");
return true;
}
else if (opacity < 1) {
if (opacity < 1) {
LOGD("Layer has planar semitransparency which is unsupported");
return false;
}
@ -444,7 +440,11 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer,
hwcLayer.visibleRegionScreen = region;
} else {
hwcLayer.flags |= HWC_COLOR_FILL;
ColorLayer* colorLayer = static_cast<ColorLayer*>(layerGL->GetLayer());
ColorLayer* colorLayer = aLayer->AsColorLayer();
if (colorLayer->GetColor().a < 1.0) {
LOGD("Color layer has semitransparency which is unsupported");
return false;
}
hwcLayer.transform = colorLayer->GetColor().Packed();
}