зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1486958
- Sync FlushRendering() only during resizing on windows r=mattwoodrow
This commit is contained in:
Родитель
82b98972c8
Коммит
24c5a93279
|
@ -637,8 +637,12 @@ WebRenderLayerManager::FlushRendering()
|
|||
}
|
||||
MOZ_ASSERT(mWidget);
|
||||
|
||||
// When DirectComposition and compositor window are used, we do not need to do sync FlushRendering.
|
||||
if (WrBridge()->GetCompositorUseDComp()) {
|
||||
// If value of IsResizingNativeWidget() is nothing, we assume that resizing might happen.
|
||||
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();
|
||||
} else if (mWidget->SynchronouslyRepaintOnResize() || gfxPrefs::LayersForceSynchronousResize()) {
|
||||
cBridge->SendFlushRendering();
|
||||
|
|
|
@ -778,6 +778,11 @@ class nsIWidget : public nsISupports
|
|||
double aHeight,
|
||||
bool aRepaint) = 0;
|
||||
|
||||
virtual mozilla::Maybe<bool> IsResizingNativeWidget()
|
||||
{
|
||||
return mozilla::Nothing();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
mozilla::Maybe<bool>
|
||||
nsWindow::IsResizingNativeWidget()
|
||||
{
|
||||
if (mResizeState == RESIZING) {
|
||||
return Some(true);
|
||||
}
|
||||
return Some(false);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsWindow::BeginResizeDrag(WidgetGUIEvent* aEvent,
|
||||
int32_t aHorizontal,
|
||||
|
|
|
@ -131,6 +131,7 @@ public:
|
|||
virtual void Move(double aX, double aY) 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 mozilla::Maybe<bool> IsResizingNativeWidget() override;
|
||||
virtual MOZ_MUST_USE nsresult
|
||||
BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
|
||||
int32_t aHorizontal,
|
||||
|
|
Загрузка…
Ссылка в новой задаче