mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
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:
parent
9a6abf29f2
commit
91050f2f19
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user