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;
|
||||
|
||||
case WM_PAINT:
|
||||
*aRetValue = (int)OnPaint(0);
|
||||
*aRetValue = (int)OnPaint();
|
||||
result = true;
|
||||
break;
|
||||
|
||||
|
||||
@@ -606,7 +606,7 @@ class nsWindow final : public nsBaseWidget,
|
||||
bool OnGesture(WPARAM wParam, LPARAM lParam);
|
||||
bool OnTouch(WPARAM wParam, LPARAM lParam);
|
||||
bool OnHotKey(WPARAM wParam, LPARAM lParam);
|
||||
bool OnPaint(uint32_t aNestingLevel);
|
||||
bool OnPaint();
|
||||
void OnWindowPosChanging(WINDOWPOS* info);
|
||||
void OnWindowPosChanged(WINDOWPOS* wp);
|
||||
void OnSysColorChanged();
|
||||
|
||||
@@ -127,7 +127,7 @@ void nsWindow::ForcePresent() {
|
||||
}
|
||||
}
|
||||
|
||||
bool nsWindow::OnPaint(uint32_t aNestingLevel) {
|
||||
bool nsWindow::OnPaint() {
|
||||
struct FallbackPaintContext {
|
||||
RefPtr<gfxASurface> mTargetSurface;
|
||||
RefPtr<DrawTarget> mDt;
|
||||
@@ -209,9 +209,6 @@ bool nsWindow::OnPaint(uint32_t aNestingLevel) {
|
||||
if (nsIWidgetListener* listener = GetPaintListener()) {
|
||||
listener->DidPaintWindow();
|
||||
}
|
||||
if (aNestingLevel == 0 && ::GetUpdateRect(mWnd, nullptr, false)) {
|
||||
OnPaint(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user