mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 571832 - Bind(Release)TexImage, fix complex logic commented by vlad
This commit is contained in:
parent
d24ded3dce
commit
df74faa7fe
@ -270,17 +270,15 @@ public:
|
|||||||
|
|
||||||
PRBool BindTexImage()
|
PRBool BindTexImage()
|
||||||
{
|
{
|
||||||
if (mBound)
|
if (!mSurface)
|
||||||
if (!ReleaseTexImage())
|
return PR_FALSE;
|
||||||
return PR_FALSE;
|
|
||||||
|
|
||||||
if (mSurface) {
|
if (mBound && !ReleaseTexImage())
|
||||||
EGLBoolean success;
|
return PR_FALSE;
|
||||||
success = sEGLLibrary.fBindTexImage(mDisplay, (EGLSurface)mSurface,
|
|
||||||
LOCAL_EGL_BACK_BUFFER);
|
EGLBoolean success = sEGLLibrary.fBindTexImage(mDisplay,
|
||||||
if (success == LOCAL_EGL_FALSE)
|
(EGLSurface)mSurface, LOCAL_EGL_BACK_BUFFER);
|
||||||
return PR_FALSE;
|
if (success == LOCAL_EGL_FALSE)
|
||||||
} else
|
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
mBound = PR_TRUE;
|
mBound = PR_TRUE;
|
||||||
@ -292,15 +290,12 @@ public:
|
|||||||
if (!mBound)
|
if (!mBound)
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
|
|
||||||
if (!mDisplay)
|
if (!mDisplay || !mSurface)
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
if (mSurface) {
|
EGLBoolean success;
|
||||||
EGLBoolean success;
|
success = sEGLLibrary.fReleaseTexImage(mDisplay, (EGLSurface)mSurface, LOCAL_EGL_BACK_BUFFER);
|
||||||
success = sEGLLibrary.fReleaseTexImage(mDisplay, (EGLSurface)mSurface, LOCAL_EGL_BACK_BUFFER);
|
if (success == LOCAL_EGL_FALSE)
|
||||||
if (success == LOCAL_EGL_FALSE)
|
|
||||||
return PR_FALSE;
|
|
||||||
} else
|
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
mBound = PR_FALSE;
|
mBound = PR_FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user