Bug 1460255 - Use gfxXlibSurface::GetGLXPixmap() on GLX only, r?jrmuizel
gfxXlibSurface::GetGLXPixmap() is provided by GL_PROVIDER_GLX but
GL_PROVIDER_GLX is not defined by Wayland target.
Don't export gfxXlibSurface::GetGLXPixmap() on Wayland now and leave that
for further fixes.
MozReview-Commit-ID: 408vjgGspG6
--- a/gfx/gl/SharedSurfaceGLX.cpp
+++ b/gfx/gl/SharedSurfaceGLX.cpp
@@ -60,24 +60,28 @@ SharedSurface_GLXDrawable::ProducerRelea
{
mGL->MakeCurrent();
mGL->fFlush();
}
void
SharedSurface_GLXDrawable::LockProdImpl()
{
+#ifdef GL_PROVIDER_GLX
mGL->Screen()->SetReadBuffer(LOCAL_GL_FRONT);
GLContextGLX::Cast(mGL)->OverrideDrawable(mXlibSurface->GetGLXPixmap());
+#endif
}
void
SharedSurface_GLXDrawable::UnlockProdImpl()
{
+#ifdef GL_PROVIDER_GLX
GLContextGLX::Cast(mGL)->RestoreDrawable();
+#endif
}
bool
SharedSurface_GLXDrawable::ToSurfaceDescriptor(layers::SurfaceDescriptor* const out_descriptor)
{
if (!mXlibSurface)
return false;