mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1089040 - Fix HWC opacity check for largers with complex regions. r=sotaro
--HG-- extra : rebase_source : e80c240766a9e44e738e706b02ba65dd3e74fd83
This commit is contained in:
parent
8300e55047
commit
0c3516c497
@ -447,7 +447,10 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer,
|
||||
// Do not compose any layer below full-screen Opaque layer
|
||||
// Note: It can be generalized to non-fullscreen Opaque layers.
|
||||
bool isOpaque = (opacity == 0xFF) && (aLayer->GetContentFlags() & Layer::CONTENT_OPAQUE);
|
||||
if (current && isOpaque) {
|
||||
// Currently we perform opacity calculation using the *bounds* of the layer.
|
||||
// We can only make this assumption if we're not dealing with a complex visible region.
|
||||
bool isSimpleVisibleRegion = visibleRegion.GetNumRects() == 1;
|
||||
if (current && isOpaque && isSimpleVisibleRegion) {
|
||||
nsIntRect displayRect = nsIntRect(displayFrame.left, displayFrame.top,
|
||||
displayFrame.right - displayFrame.left, displayFrame.bottom - displayFrame.top);
|
||||
if (displayRect.Contains(mScreenRect)) {
|
||||
|
Loading…
Reference in New Issue
Block a user