зеркало из https://github.com/mozilla/gecko-dev.git
Fix for multitude of print statements that SHM is not available when
displaying on Hummingbird PC X Display Server
This commit is contained in:
Родитель
e8ab388331
Коммит
19f7a6209a
|
@ -206,14 +206,25 @@ nsresult nsRenderingContextUnix :: CommonInit()
|
||||||
mContext->GetAppUnitsToDevUnits());
|
mContext->GetAppUnitsToDevUnits());
|
||||||
|
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
if (XShmQueryVersion(mRenderingSurface->display,
|
|
||||||
&shmMajor,
|
|
||||||
&shmMinor,
|
|
||||||
&mSupportsSharedPixmaps) != 0) {
|
|
||||||
|
|
||||||
mHasSharedMemory = PR_TRUE;
|
// We need to query the extension first using straight XLib since
|
||||||
mRenderingSurface->shmImage = nsnull;
|
// the Shared memory invocation prints an error message to stdout
|
||||||
mRenderingSurface->shmInfo.shmaddr = nsnull;
|
|
||||||
|
PRInt32 maj, evt, err;
|
||||||
|
|
||||||
|
if (::XQueryExtension(mRenderingSurface->display,
|
||||||
|
"MIT-SHM",
|
||||||
|
&maj, &evt, &err) == True) {
|
||||||
|
|
||||||
|
if (XShmQueryVersion(mRenderingSurface->display,
|
||||||
|
&shmMajor,
|
||||||
|
&shmMinor,
|
||||||
|
&mSupportsSharedPixmaps) != 0) {
|
||||||
|
|
||||||
|
mHasSharedMemory = PR_TRUE;
|
||||||
|
mRenderingSurface->shmImage = nsnull;
|
||||||
|
mRenderingSurface->shmInfo.shmaddr = nsnull;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче