Loading gfx/layers/d3d11/CompositorD3D11.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -967,7 +967,7 @@ CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion, // this is important because resizing our buffers when mimised will fail and // cause a crash when we're restored. NS_ASSERTION(mHwnd, "Couldn't find an HWND when initialising?"); if (::IsIconic(mHwnd)) { if (mWidget->IsHidden()) { // We are not going to render, and not going to call EndFrame so we have to // read-unlock our textures to prevent them from accumulating. ReadUnlockTextures(); Loading widget/CompositorWidget.h +7 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,13 @@ public: return mOptions; } /** * Return true if the window is hidden and should not be composited. */ virtual bool IsHidden() const { return false; } /** * This is only used by out-of-process compositors. */ Loading widget/windows/WinCompositorWidget.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -327,5 +327,11 @@ WinCompositorWidget::FreeWindowSurface(HDC dc) ::ReleaseDC(mWnd, dc); } bool WinCompositorWidget::IsHidden() const { return ::IsIconic(mWnd); } } // namespace widget } // namespace mozilla widget/windows/WinCompositorWidget.h +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public: CompositorWidgetDelegate* AsDelegate() override { return this; } bool IsHidden() const override; // CompositorWidgetDelegate overrides. void EnterPresentLock() override; Loading Loading
gfx/layers/d3d11/CompositorD3D11.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -967,7 +967,7 @@ CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion, // this is important because resizing our buffers when mimised will fail and // cause a crash when we're restored. NS_ASSERTION(mHwnd, "Couldn't find an HWND when initialising?"); if (::IsIconic(mHwnd)) { if (mWidget->IsHidden()) { // We are not going to render, and not going to call EndFrame so we have to // read-unlock our textures to prevent them from accumulating. ReadUnlockTextures(); Loading
widget/CompositorWidget.h +7 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,13 @@ public: return mOptions; } /** * Return true if the window is hidden and should not be composited. */ virtual bool IsHidden() const { return false; } /** * This is only used by out-of-process compositors. */ Loading
widget/windows/WinCompositorWidget.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -327,5 +327,11 @@ WinCompositorWidget::FreeWindowSurface(HDC dc) ::ReleaseDC(mWnd, dc); } bool WinCompositorWidget::IsHidden() const { return ::IsIconic(mWnd); } } // namespace widget } // namespace mozilla
widget/windows/WinCompositorWidget.h +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public: CompositorWidgetDelegate* AsDelegate() override { return this; } bool IsHidden() const override; // CompositorWidgetDelegate overrides. void EnterPresentLock() override; Loading