mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
b=567272; wglMakeCurrent is expensive; r=bas
This commit is contained in:
parent
25071d58a5
commit
e163e03a8f
@ -207,8 +207,17 @@ public:
|
||||
|
||||
PRBool MakeCurrent()
|
||||
{
|
||||
BOOL succeeded = sWGLLibrary.fMakeCurrent(mDC, mContext);
|
||||
NS_ASSERTION(succeeded, "Failed to make GL context current!");
|
||||
BOOL succeeded = PR_TRUE;
|
||||
|
||||
// wglGetCurrentContext seems to just pull the HGLRC out
|
||||
// of its TLS slot, so no need to do our own tls slot.
|
||||
// You would think that wglMakeCurrent would avoid doing
|
||||
// work if mContext was already current, but not so much..
|
||||
if (sWGLLibrary.fGetCurrentContext() != mContext) {
|
||||
succeeded = sWGLLibrary.fMakeCurrent(mDC, mContext);
|
||||
NS_ASSERTION(succeeded, "Failed to make GL context current!");
|
||||
}
|
||||
|
||||
return succeeded;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user