mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 539356 - Part 24 - Don't paint android widgets that aren't being composited, or at the front. r=roc
This commit is contained in:
parent
f132718f0c
commit
e0bc87022c
@ -2336,5 +2336,14 @@ nsWindow::WidgetPaintsBackground()
|
||||
return sWidgetPaintsBackground;
|
||||
}
|
||||
|
||||
bool
|
||||
nsWindow::NeedsPaint()
|
||||
{
|
||||
if (sCompositorPaused || FindTopLevel() != nsWindow::TopWindow()) {
|
||||
return false;
|
||||
}
|
||||
return nsIWidget::NeedsPaint();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -148,6 +148,7 @@ public:
|
||||
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent);
|
||||
|
||||
#ifdef MOZ_JAVA_COMPOSITOR
|
||||
virtual bool NeedsPaint();
|
||||
virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect);
|
||||
virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect);
|
||||
|
||||
|
@ -1572,7 +1572,7 @@ class nsIWidget : public nsISupports {
|
||||
virtual bool WidgetPaintsBackground() { return false; }
|
||||
|
||||
void SetNeedsPaint(bool aNeedsPaint) { mNeedsPaint = aNeedsPaint; }
|
||||
bool NeedsPaint() {
|
||||
virtual bool NeedsPaint() {
|
||||
if (!mNeedsPaint) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user