mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 1193015 - Require MOZ_GLX_USE_SURFACE_SHARING to enable WebGL surface sharing on GLX. r=jgilbert
This commit is contained in:
parent
439f56e019
commit
b2668b2662
@ -21,6 +21,7 @@ typedef XID GLXContextID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
// end of stuff from glx.h
|
||||
#include "prenv.h"
|
||||
|
||||
struct PRLibrary;
|
||||
class gfxASurface;
|
||||
@ -108,6 +109,12 @@ public:
|
||||
bool SupportsTextureFromPixmap(gfxASurface* aSurface);
|
||||
bool IsATI() { return mIsATI; }
|
||||
bool GLXVersionCheck(int aMajor, int aMinor);
|
||||
bool UseSurfaceSharing() {
|
||||
// Disable surface sharing due to issues with compatible FBConfigs on
|
||||
// NVIDIA drivers as described in bug 1193015.
|
||||
static bool useSharing = PR_GetEnv("MOZ_GLX_USE_SURFACE_SHARING");
|
||||
return mUseTextureFromPixmap && useSharing;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -92,7 +92,7 @@ ClientCanvasLayer::Initialize(const Data& aData)
|
||||
#elif defined(MOZ_WIDGET_GONK)
|
||||
factory = MakeUnique<SurfaceFactory_Gralloc>(mGLContext, caps, forwarder, mFlags);
|
||||
#elif defined(GL_PROVIDER_GLX)
|
||||
if (sGLXLibrary.UseTextureFromPixmap())
|
||||
if (sGLXLibrary.UseSurfaceSharing())
|
||||
factory = SurfaceFactory_GLXDrawable::Create(mGLContext, caps, forwarder, mFlags);
|
||||
#else
|
||||
if (mGLContext->GetContextType() == GLContextType::EGL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user