зеркало из 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());
|
||||
|
||||
#ifdef MITSHM
|
||||
if (XShmQueryVersion(mRenderingSurface->display,
|
||||
&shmMajor,
|
||||
&shmMinor,
|
||||
&mSupportsSharedPixmaps) != 0) {
|
||||
|
||||
mHasSharedMemory = PR_TRUE;
|
||||
mRenderingSurface->shmImage = nsnull;
|
||||
mRenderingSurface->shmInfo.shmaddr = nsnull;
|
||||
// We need to query the extension first using straight XLib since
|
||||
// the Shared memory invocation prints an error message to stdout
|
||||
|
||||
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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче