Bug 949814 - Remove GetEGLContext and GetLibraryEGL from GLContext - r=jgilbert

This commit is contained in:
Benoit Jacob
2014-01-02 10:17:25 -05:00
parent a0b7843a48
commit 0b5c655bb5
7 changed files with 13 additions and 37 deletions

View File

@@ -22,28 +22,16 @@ EGLImageCreateFromNativeBuffer(GLContext* aGL, void* aBuffer)
LOCAL_EGL_NONE, LOCAL_EGL_NONE
};
GLLibraryEGL* egl = aGL->GetLibraryEGL();
if (!egl) {
NS_WARNING("Failed to obtain pointer to EGL. Returning EGL_NO_IMAGE.");
return EGL_NO_IMAGE;
}
return egl->fCreateImage(egl->Display(),
EGL_NO_CONTEXT,
LOCAL_EGL_NATIVE_BUFFER_ANDROID,
aBuffer, attrs);
return sEGLLibrary.fCreateImage(sEGLLibrary.Display(),
EGL_NO_CONTEXT,
LOCAL_EGL_NATIVE_BUFFER_ANDROID,
aBuffer, attrs);
}
void
EGLImageDestroy(GLContext* aGL, EGLImage aImage)
{
GLLibraryEGL* egl = aGL->GetLibraryEGL();
if (!egl) {
NS_WARNING("Failed to obtain pointer to EGL. Image not destroyed.");
return;
}
egl->fDestroyImage(egl->Display(), aImage);
sEGLLibrary.fDestroyImage(sEGLLibrary.Display(), aImage);
}
} // namespace layers