diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index 825c3841b09..771ada9c5d5 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -888,10 +888,10 @@ SharedTextureHandle GLContextEGL::CreateSharedHandle(TextureImage::TextureShareType aType) { if (aType != TextureImage::ThreadShared) - return nsnull; + return 0; if (!mShareWithEGLImage) - return nsnull; + return 0; MakeCurrent(); GLuint texture = 0; @@ -903,7 +903,7 @@ GLContextEGL::CreateSharedHandle(TextureImage::TextureShareType aType) if (!tex->CreateEGLImage()) { NS_ERROR("EGLImage creation for EGLTextureWrapper failed"); ReleaseSharedHandle(aType, (SharedTextureHandle)tex); - return nsnull; + return 0; } // Raw pointer shared across threads return (SharedTextureHandle)tex; @@ -917,35 +917,35 @@ GLContextEGL::CreateSharedHandle(TextureImage::TextureShareType aType, // Both EGLImage and SurfaceTexture only support ThreadShared currently, but // it's possible to make SurfaceTexture work across processes. We should do that. if (aType != TextureImage::ThreadShared) - return nsnull; + return 0; switch (aBufferType) { #ifdef MOZ_WIDGET_ANDROID case SharedTextureBufferType::SurfaceTexture: if (!IsExtensionSupported(GLContext::OES_EGL_image_external)) { NS_WARNING("Missing GL_OES_EGL_image_external"); - return nsnull; + return 0; } return (SharedTextureHandle) new SurfaceTextureWrapper(reinterpret_cast(aBuffer)); #endif case SharedTextureBufferType::TextureID: { if (!mShareWithEGLImage) - return nsnull; + return 0; GLuint texture = (GLuint)aBuffer; EGLTextureWrapper* tex = new EGLTextureWrapper(this, texture, false); if (!tex->CreateEGLImage()) { NS_ERROR("EGLImage creation for EGLTextureWrapper failed"); delete tex; - return nsnull; + return 0; } return (SharedTextureHandle)tex; } default: NS_ERROR("Unknown shared texture buffer type"); - return nsnull; + return 0; } }