mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1022612. Part 42: Add opaque regions of ThebesLayer content to the "exclude glass" region. r=mattwoodrow
--HG-- extra : rebase_source : 715df6c86b139aec7ad607e56c89dbfad3475380
This commit is contained in:
parent
6cd2fbb7d6
commit
4465fecb8a
@ -2600,6 +2600,12 @@ ContainerState::ComputeOpaqueRect(nsDisplayItem* aItem,
|
||||
opaqueClipped.Contains(mContainerBounds)) {
|
||||
aList->SetIsOpaque();
|
||||
}
|
||||
// Add opaque areas to the "exclude glass" region. Only do this for
|
||||
// ThebesLayers which are direct children of the root layer; this means
|
||||
// they can't have transforms or opacity wrapping them.
|
||||
if (!mContainerLayer->GetParent() && mBuilder->HasGlass()) {
|
||||
mBuilder->AddExcludedGlassRegion(opaqueClipped);
|
||||
}
|
||||
opaquePixels = ScaleRegionToInsidePixels(opaqueClipped, snapOpaque);
|
||||
if (aFixedPosFrame && ItemCoversScrollableArea(aItem, opaque)) {
|
||||
*aHideAllLayersBelow = true;
|
||||
|
@ -667,7 +667,7 @@ public:
|
||||
* -moz-win-exclude-glass style. Used in setting glass margins on
|
||||
* Windows.
|
||||
*/
|
||||
void AddExcludedGlassRegion(nsRect &bounds) {
|
||||
void AddExcludedGlassRegion(const nsRegion& bounds) {
|
||||
mExcludedGlassRegion.Or(mExcludedGlassRegion, bounds);
|
||||
}
|
||||
const nsRegion& GetExcludedGlassRegion() {
|
||||
@ -684,6 +684,10 @@ public:
|
||||
mGlassDisplayItem = aItem;
|
||||
}
|
||||
}
|
||||
// Call this only after we've finished building the display list
|
||||
bool HasGlass() {
|
||||
return mGlassDisplayItem != nullptr;
|
||||
}
|
||||
bool NeedToForceTransparentSurfaceForItem(nsDisplayItem* aItem) {
|
||||
return aItem == mGlassDisplayItem;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user