diff --git a/gfx/layers/wr/WebRenderLayerManager.cpp b/gfx/layers/wr/WebRenderLayerManager.cpp index a17be9dec292..e545ac063bdf 100644 --- a/gfx/layers/wr/WebRenderLayerManager.cpp +++ b/gfx/layers/wr/WebRenderLayerManager.cpp @@ -257,13 +257,8 @@ bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) { // Since we don't do repeat transactions right now, just set the time mAnimationReadyTime = TimeStamp::Now(); -#if MOZ_WIDGET_GTK - // Don't block on hidden windows on Linux as it may block all rendering - const bool throttle = mWidget->IsMapped(); -#else - const bool throttle = true; -#endif - mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(throttle); + mLatestTransactionId = + mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true); if (aFlags & EndTransactionFlags::END_NO_COMPOSITE && !mWebRenderCommandBuilder.NeedsEmptyTransaction()) { @@ -411,13 +406,8 @@ void WebRenderLayerManager::EndTransactionWithoutLayer( nsLayoutUtils::NotifyPaintSkipTransaction(update); } -#if MOZ_WIDGET_GTK - // Don't block on hidden windows on Linux as it may block all rendering - const bool throttle = mWidget->IsMapped(); -#else - const bool throttle = true; -#endif - mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(throttle); + mLatestTransactionId = + mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true); // Get the time of when the refresh driver start its tick (if available), // otherwise use the time of when LayerManager::BeginTransaction was called. diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h index 1d7536b33e6b..440f5620f9d6 100644 --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -155,7 +155,6 @@ class nsWindow final : public nsBaseWidget { void SetParent(nsIWidget* aNewParent) override; void SetModal(bool aModal) override; bool IsVisible() const override; - bool IsMapped() const override { return mIsMapped; } void ConstrainPosition(bool aAllowSlop, int32_t* aX, int32_t* aY) override; void SetSizeConstraints(const SizeConstraints& aConstraints) override; void LockAspectRatio(bool aShouldLock) override; @@ -282,6 +281,7 @@ class nsWindow final : public nsBaseWidget { nsIFrame* GetFrame() const; nsWindow* GetEffectiveParent(); bool IsDestroyed() const { return mIsDestroyed; } + bool IsMapped() const { return mIsMapped; } bool IsPopup() const; bool IsWaylandPopup() const; bool IsPIPWindow() const { return mIsPIPWindow; }; diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 3bd2ba8638c6..c3465a16df11 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -682,18 +682,11 @@ class nsIWidget : public nsISupports { virtual uint32_t GetMaxTouchPoints() const = 0; /** - * Returns whether the window is visible from browser perspective. + * Returns whether the window is visible * */ virtual bool IsVisible() const = 0; - /** - * Returns whether the window is visible from OS perspective, - * i.e. the window is really visible. - * It's used on Linux/Gtk where we should not paint to invisible window. - */ - virtual bool IsMapped() const { return false; } - /** * Perform platform-dependent sanity check on a potential window position. * This is guaranteed to work only for top-level windows.