mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 693930 - Release layer tree for inactive tabs. r=roc
This commit is contained in:
parent
7e6ba97bfa
commit
e8900854ba
@ -73,6 +73,7 @@
|
||||
#include "nsStyleAnimation.h"
|
||||
#include "nsCSSProps.h"
|
||||
#include "nsDOMFile.h"
|
||||
#include "BasicLayers.h"
|
||||
|
||||
#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK2)
|
||||
#include <gdk/gdk.h>
|
||||
@ -339,6 +340,21 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
|
||||
rootFrame->InvalidateWithFlags(
|
||||
usingDisplayport ? rootDisplayport : rootFrame->GetVisualOverflowRect(),
|
||||
nsIFrame::INVALIDATE_NO_THEBES_LAYERS);
|
||||
|
||||
// Send empty paint transaction in order to release retained layers
|
||||
if (displayport.IsEmpty()) {
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
if (widget) {
|
||||
bool isRetainingManager;
|
||||
LayerManager* manager = widget->GetLayerManager(&isRetainingManager);
|
||||
if (isRetainingManager) {
|
||||
manager->BeginTransaction();
|
||||
nsLayoutUtils::PaintFrame(nsnull, rootFrame, nsRegion(), NS_RGB(255, 255, 255),
|
||||
nsLayoutUtils::PAINT_WIDGET_LAYERS |
|
||||
nsLayoutUtils::PAINT_EXISTING_TRANSACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user