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");
mIsNVIDIA = serverVendor && DoesStringMatch(serverVendor, "NVIDIA Corporation");
mClientIsMesa = clientVendor && DoesStringMatch(clientVendor, "Mesa");
mInitialized = true;
@ -367,7 +368,10 @@ GLXLibrary::CreatePixmap(gfxASurface* aSurface)
// again).
//
// 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;
}

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

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