mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1245550 - add gfx.use-glx-texture-from-pixmap pref to control whether texture_from_pixmap is used. r=nical
This commit is contained in:
parent
7bbb6996af
commit
6df289e33c
@ -32,6 +32,7 @@
|
|||||||
#include "gfxUtils.h"
|
#include "gfxUtils.h"
|
||||||
#include "gfx2DGlue.h"
|
#include "gfx2DGlue.h"
|
||||||
#include "GLScreenBuffer.h"
|
#include "GLScreenBuffer.h"
|
||||||
|
#include "gfxPrefs.h"
|
||||||
|
|
||||||
#include "gfxCrashReporterUtils.h"
|
#include "gfxCrashReporterUtils.h"
|
||||||
|
|
||||||
@ -227,11 +228,7 @@ GLXLibrary::EnsureInitialized()
|
|||||||
GLLibraryLoader::LoadSymbols(mOGLLibrary, symbols_texturefrompixmap,
|
GLLibraryLoader::LoadSymbols(mOGLLibrary, symbols_texturefrompixmap,
|
||||||
(GLLibraryLoader::PlatformLookupFunction)&xGetProcAddress))
|
(GLLibraryLoader::PlatformLookupFunction)&xGetProcAddress))
|
||||||
{
|
{
|
||||||
#ifdef MOZ_WIDGET_GTK
|
mUseTextureFromPixmap = gfxPrefs::UseGLXTextureFromPixmap();
|
||||||
mUseTextureFromPixmap = gfxPlatformGtk::GetPlatform()->UseXRender();
|
|
||||||
#else
|
|
||||||
mUseTextureFromPixmap = true;
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
mUseTextureFromPixmap = false;
|
mUseTextureFromPixmap = false;
|
||||||
NS_WARNING("Texture from pixmap disabled");
|
NS_WARNING("Texture from pixmap disabled");
|
||||||
|
@ -81,7 +81,7 @@ GLScreenBuffer::CreateFactory(GLContext* gl,
|
|||||||
#elif defined(MOZ_WIDGET_GONK)
|
#elif defined(MOZ_WIDGET_GONK)
|
||||||
factory = MakeUnique<SurfaceFactory_Gralloc>(gl, caps, forwarder, flags);
|
factory = MakeUnique<SurfaceFactory_Gralloc>(gl, caps, forwarder, flags);
|
||||||
#elif defined(GL_PROVIDER_GLX)
|
#elif defined(GL_PROVIDER_GLX)
|
||||||
if (sGLXLibrary.UseSurfaceSharing())
|
if (sGLXLibrary.UseTextureFromPixmap())
|
||||||
factory = SurfaceFactory_GLXDrawable::Create(gl, caps, forwarder, flags);
|
factory = SurfaceFactory_GLXDrawable::Create(gl, caps, forwarder, flags);
|
||||||
#elif defined(MOZ_WIDGET_UIKIT)
|
#elif defined(MOZ_WIDGET_UIKIT)
|
||||||
factory = MakeUnique<SurfaceFactory_GLTexture>(mGLContext, caps, forwarder, mFlags);
|
factory = MakeUnique<SurfaceFactory_GLTexture>(mGLContext, caps, forwarder, mFlags);
|
||||||
@ -116,7 +116,7 @@ GLScreenBuffer::CreateFactory(GLContext* gl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GL_PROVIDER_GLX
|
#ifdef GL_PROVIDER_GLX
|
||||||
if (!factory && sGLXLibrary.UseSurfaceSharing()) {
|
if (!factory && sGLXLibrary.UseTextureFromPixmap()) {
|
||||||
factory = SurfaceFactory_GLXDrawable::Create(gl, caps, forwarder, flags);
|
factory = SurfaceFactory_GLXDrawable::Create(gl, caps, forwarder, flags);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -134,12 +134,6 @@ public:
|
|||||||
bool SupportsTextureFromPixmap(gfxASurface* aSurface);
|
bool SupportsTextureFromPixmap(gfxASurface* aSurface);
|
||||||
bool IsATI() { return mIsATI; }
|
bool IsATI() { return mIsATI; }
|
||||||
bool GLXVersionCheck(int aMajor, int aMinor);
|
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:
|
private:
|
||||||
|
|
||||||
|
@ -263,6 +263,10 @@ private:
|
|||||||
|
|
||||||
DECL_GFX_PREF(Live, "gfx.content.use-native-pushlayer", UseNativePushLayer, bool, false);
|
DECL_GFX_PREF(Live, "gfx.content.use-native-pushlayer", UseNativePushLayer, bool, false);
|
||||||
|
|
||||||
|
// Disable surface sharing due to issues with compatible FBConfigs on
|
||||||
|
// NVIDIA drivers as described in bug 1193015.
|
||||||
|
DECL_GFX_PREF(Live, "gfx.use-glx-texture-from-pixmap", UseGLXTextureFromPixmap, bool, false);
|
||||||
|
|
||||||
// These times should be in milliseconds
|
// These times should be in milliseconds
|
||||||
DECL_GFX_PREF(Once, "gfx.touch.resample.delay-threshold", TouchResampleVsyncDelayThreshold, int32_t, 20);
|
DECL_GFX_PREF(Once, "gfx.touch.resample.delay-threshold", TouchResampleVsyncDelayThreshold, int32_t, 20);
|
||||||
DECL_GFX_PREF(Once, "gfx.touch.resample.max-predict", TouchResampleMaxPredict, int32_t, 8);
|
DECL_GFX_PREF(Once, "gfx.touch.resample.max-predict", TouchResampleMaxPredict, int32_t, 8);
|
||||||
|
Loading…
Reference in New Issue
Block a user