mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1486958
- Sync FlushRendering() only during resizing on windows r=mattwoodrow
This commit is contained in:
parent
82b98972c8
commit
24c5a93279
@ -637,8 +637,12 @@ WebRenderLayerManager::FlushRendering()
|
|||||||
}
|
}
|
||||||
MOZ_ASSERT(mWidget);
|
MOZ_ASSERT(mWidget);
|
||||||
|
|
||||||
// When DirectComposition and compositor window are used, we do not need to do sync FlushRendering.
|
// If value of IsResizingNativeWidget() is nothing, we assume that resizing might happen.
|
||||||
if (WrBridge()->GetCompositorUseDComp()) {
|
bool resizing = mWidget && mWidget->IsResizingNativeWidget().valueOr(true);
|
||||||
|
|
||||||
|
// Limit async FlushRendering to !resizing and Win DComp.
|
||||||
|
// XXX relax the limitation
|
||||||
|
if (WrBridge()->GetCompositorUseDComp() && !resizing) {
|
||||||
cBridge->SendFlushRenderingAsync();
|
cBridge->SendFlushRenderingAsync();
|
||||||
} else if (mWidget->SynchronouslyRepaintOnResize() || gfxPrefs::LayersForceSynchronousResize()) {
|
} else if (mWidget->SynchronouslyRepaintOnResize() || gfxPrefs::LayersForceSynchronousResize()) {
|
||||||
cBridge->SendFlushRendering();
|
cBridge->SendFlushRendering();
|
||||||
|
@ -778,6 +778,11 @@ class nsIWidget : public nsISupports
|
|||||||
double aHeight,
|
double aHeight,
|
||||||
bool aRepaint) = 0;
|
bool aRepaint) = 0;
|
||||||
|
|
||||||
|
virtual mozilla::Maybe<bool> IsResizingNativeWidget()
|
||||||
|
{
|
||||||
|
return mozilla::Nothing();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resize the widget so that the inner client area has the given size.
|
* Resize the widget so that the inner client area has the given size.
|
||||||
*
|
*
|
||||||
|
@ -1988,6 +1988,15 @@ nsWindow::Resize(double aX, double aY, double aWidth,
|
|||||||
NotifyRollupGeometryChange();
|
NotifyRollupGeometryChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mozilla::Maybe<bool>
|
||||||
|
nsWindow::IsResizingNativeWidget()
|
||||||
|
{
|
||||||
|
if (mResizeState == RESIZING) {
|
||||||
|
return Some(true);
|
||||||
|
}
|
||||||
|
return Some(false);
|
||||||
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsWindow::BeginResizeDrag(WidgetGUIEvent* aEvent,
|
nsWindow::BeginResizeDrag(WidgetGUIEvent* aEvent,
|
||||||
int32_t aHorizontal,
|
int32_t aHorizontal,
|
||||||
|
@ -131,6 +131,7 @@ public:
|
|||||||
virtual void Move(double aX, double aY) override;
|
virtual void Move(double aX, double aY) override;
|
||||||
virtual void Resize(double aWidth, double aHeight, bool aRepaint) override;
|
virtual void Resize(double aWidth, double aHeight, bool aRepaint) override;
|
||||||
virtual void Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
|
virtual void Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
|
||||||
|
virtual mozilla::Maybe<bool> IsResizingNativeWidget() override;
|
||||||
virtual MOZ_MUST_USE nsresult
|
virtual MOZ_MUST_USE nsresult
|
||||||
BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
|
BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
|
||||||
int32_t aHorizontal,
|
int32_t aHorizontal,
|
||||||
|
Loading…
Reference in New Issue
Block a user