Bug 896287 - NVIDIA specific GLX server vendor check for pixmap depth and fbConfig depth. r=karlt

This commit is contained in:
Joseph Yasi 2013-08-20 08:30:26 -04:00
Родитель dc4722e99e
Коммит 23b31d66b9
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -263,6 +263,7 @@ GLXLibrary::EnsureInitialized(LibType libType)
} }
mIsATI = serverVendor && DoesStringMatch(serverVendor, "ATI"); mIsATI = serverVendor && DoesStringMatch(serverVendor, "ATI");
mIsNVIDIA = serverVendor && DoesStringMatch(serverVendor, "NVIDIA Corporation");
mClientIsMesa = clientVendor && DoesStringMatch(clientVendor, "Mesa"); mClientIsMesa = clientVendor && DoesStringMatch(clientVendor, "Mesa");
mInitialized = true; mInitialized = true;
@ -367,7 +368,10 @@ GLXLibrary::CreatePixmap(gfxASurface* aSurface)
// again). // again).
// //
// This checks that the depth matches in one of the two ways. // This checks that the depth matches in one of the two ways.
if (depth != format->depth && depth != format->depth - alphaSize) { // NVIDIA now forces format->depth == depth so only the first way
// is checked for NVIDIA
if (depth != format->depth &&
(mIsNVIDIA || depth != format->depth - alphaSize) ) {
continue; continue;
} }

Просмотреть файл

@ -18,7 +18,7 @@ class GLXLibrary
public: public:
GLXLibrary() : mInitialized(false), mTriedInitializing(false), GLXLibrary() : mInitialized(false), mTriedInitializing(false),
mUseTextureFromPixmap(false), mDebug(false), mUseTextureFromPixmap(false), mDebug(false),
mHasRobustness(false), mIsATI(false), mHasRobustness(false), mIsATI(false), mIsNVIDIA(false),
mClientIsMesa(false), mGLXMajorVersion(0), mClientIsMesa(false), mGLXMajorVersion(0),
mGLXMinorVersion(0), mLibType(OPENGL_LIB), mGLXMinorVersion(0), mLibType(OPENGL_LIB),
mOGLLibrary(nullptr) {} mOGLLibrary(nullptr) {}
@ -202,6 +202,7 @@ private:
bool mDebug; bool mDebug;
bool mHasRobustness; bool mHasRobustness;
bool mIsATI; bool mIsATI;
bool mIsNVIDIA;
bool mClientIsMesa; bool mClientIsMesa;
int mGLXMajorVersion; int mGLXMajorVersion;
int mGLXMinorVersion; int mGLXMinorVersion;