Bug 1958711 - Remove reentrancy from nsWindow::OnPaint. r=win-reviewers,handyman
I don't think this should be needed. Painting shouldn't trigger new invalidations (and nowadays most of the actual compositing doesn't happen here anyways). Differential Revision: https://phabricator.services.mozilla.com/D244531
This commit is contained in:
@@ -5025,7 +5025,7 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
*aRetValue = (int)OnPaint(0);
|
*aRetValue = (int)OnPaint();
|
||||||
result = true;
|
result = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -606,7 +606,7 @@ class nsWindow final : public nsBaseWidget,
|
|||||||
bool OnGesture(WPARAM wParam, LPARAM lParam);
|
bool OnGesture(WPARAM wParam, LPARAM lParam);
|
||||||
bool OnTouch(WPARAM wParam, LPARAM lParam);
|
bool OnTouch(WPARAM wParam, LPARAM lParam);
|
||||||
bool OnHotKey(WPARAM wParam, LPARAM lParam);
|
bool OnHotKey(WPARAM wParam, LPARAM lParam);
|
||||||
bool OnPaint(uint32_t aNestingLevel);
|
bool OnPaint();
|
||||||
void OnWindowPosChanging(WINDOWPOS* info);
|
void OnWindowPosChanging(WINDOWPOS* info);
|
||||||
void OnWindowPosChanged(WINDOWPOS* wp);
|
void OnWindowPosChanged(WINDOWPOS* wp);
|
||||||
void OnSysColorChanged();
|
void OnSysColorChanged();
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ void nsWindow::ForcePresent() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsWindow::OnPaint(uint32_t aNestingLevel) {
|
bool nsWindow::OnPaint() {
|
||||||
struct FallbackPaintContext {
|
struct FallbackPaintContext {
|
||||||
RefPtr<gfxASurface> mTargetSurface;
|
RefPtr<gfxASurface> mTargetSurface;
|
||||||
RefPtr<DrawTarget> mDt;
|
RefPtr<DrawTarget> mDt;
|
||||||
@@ -209,9 +209,6 @@ bool nsWindow::OnPaint(uint32_t aNestingLevel) {
|
|||||||
if (nsIWidgetListener* listener = GetPaintListener()) {
|
if (nsIWidgetListener* listener = GetPaintListener()) {
|
||||||
listener->DidPaintWindow();
|
listener->DidPaintWindow();
|
||||||
}
|
}
|
||||||
if (aNestingLevel == 0 && ::GetUpdateRect(mWnd, nullptr, false)) {
|
|
||||||
OnPaint(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user