mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1243636. Switch to gfx::CriticalSection
This commit is contained in:
parent
a0112e3e9a
commit
5150171f15
@ -460,7 +460,6 @@ nsWindow::nsWindow()
|
|||||||
|
|
||||||
mIdleService = nullptr;
|
mIdleService = nullptr;
|
||||||
|
|
||||||
::InitializeCriticalSection(&mPresentLock);
|
|
||||||
mSizeConstraintsScale = GetDefaultScale().scale;
|
mSizeConstraintsScale = GetDefaultScale().scale;
|
||||||
|
|
||||||
sInstanceCount++;
|
sInstanceCount++;
|
||||||
@ -497,7 +496,6 @@ nsWindow::~nsWindow()
|
|||||||
sIsOleInitialized = FALSE;
|
sIsOleInitialized = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::DeleteCriticalSection(&mPresentLock);
|
|
||||||
|
|
||||||
NS_IF_RELEASE(mNativeDragTarget);
|
NS_IF_RELEASE(mNativeDragTarget);
|
||||||
}
|
}
|
||||||
@ -4967,13 +4965,13 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
|||||||
//
|
//
|
||||||
// To do this we take mPresentLock in nsWindow::PreRender and
|
// To do this we take mPresentLock in nsWindow::PreRender and
|
||||||
// if that lock is taken we wait before doing WM_SETTEXT
|
// if that lock is taken we wait before doing WM_SETTEXT
|
||||||
EnterCriticalSection(&mPresentLock);
|
mPresentLock.Enter();
|
||||||
DWORD style = GetWindowLong(mWnd, GWL_STYLE);
|
DWORD style = GetWindowLong(mWnd, GWL_STYLE);
|
||||||
SetWindowLong(mWnd, GWL_STYLE, style & ~WS_VISIBLE);
|
SetWindowLong(mWnd, GWL_STYLE, style & ~WS_VISIBLE);
|
||||||
*aRetValue = CallWindowProcW(GetPrevWindowProc(), mWnd,
|
*aRetValue = CallWindowProcW(GetPrevWindowProc(), mWnd,
|
||||||
msg, wParam, lParam);
|
msg, wParam, lParam);
|
||||||
SetWindowLong(mWnd, GWL_STYLE, style);
|
SetWindowLong(mWnd, GWL_STYLE, style);
|
||||||
LeaveCriticalSection(&mPresentLock);
|
mPresentLock.Leave();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -7837,13 +7835,13 @@ bool nsWindow::PreRender(LayerManagerComposite*)
|
|||||||
// Using PreRender is unnecessarily pessimistic because
|
// Using PreRender is unnecessarily pessimistic because
|
||||||
// we technically only need to block during the present call
|
// we technically only need to block during the present call
|
||||||
// not all of compositor rendering
|
// not all of compositor rendering
|
||||||
EnterCriticalSection(&mPresentLock);
|
mPresentLock.Enter();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsWindow::PostRender(LayerManagerComposite*)
|
void nsWindow::PostRender(LayerManagerComposite*)
|
||||||
{
|
{
|
||||||
LeaveCriticalSection(&mPresentLock);
|
mPresentLock.Leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
#include "nsRegion.h"
|
#include "nsRegion.h"
|
||||||
#include "mozilla/EventForwards.h"
|
#include "mozilla/EventForwards.h"
|
||||||
|
#include "mozilla/gfx/CriticalSection.h"
|
||||||
#include "mozilla/MouseEvents.h"
|
#include "mozilla/MouseEvents.h"
|
||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
#include "nsMargin.h"
|
#include "nsMargin.h"
|
||||||
@ -628,7 +629,7 @@ protected:
|
|||||||
static bool sNeedsToInitMouseWheelSettings;
|
static bool sNeedsToInitMouseWheelSettings;
|
||||||
static void InitMouseWheelScrollData();
|
static void InitMouseWheelScrollData();
|
||||||
|
|
||||||
CRITICAL_SECTION mPresentLock;
|
mozilla::gfx::CriticalSection mPresentLock;
|
||||||
|
|
||||||
double mSizeConstraintsScale; // scale in effect when setting constraints
|
double mSizeConstraintsScale; // scale in effect when setting constraints
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user