Merge remote-tracking branch 'daniels/master'
This commit is contained in:
commit
d50a94568e
|
@ -407,4 +407,6 @@ extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
|
|||
|
||||
#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
|
||||
|
||||
void DMXExtensionInit(void);
|
||||
|
||||
#endif /* DMX_H */
|
||||
|
|
|
@ -68,10 +68,13 @@
|
|||
#include <GL/glx.h>
|
||||
#include <GL/glxint.h>
|
||||
#include "dmx_glxvisuals.h"
|
||||
#include "glx_extinit.h"
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#endif /* GLXEXT */
|
||||
|
||||
#include <X11/extensions/dmxproto.h>
|
||||
|
||||
/* Global variables available to all Xserver/hw/dmx routines. */
|
||||
int dmxNumScreens;
|
||||
DMXScreenInfo *dmxScreens;
|
||||
|
@ -586,6 +589,20 @@ dmxExecHost(void)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static void dmxAddExtensions(Bool glxSupported)
|
||||
{
|
||||
const ExtensionModule dmxExtensions[] = {
|
||||
{ DMXExtensionInit, DMX_EXTENSION_NAME, NULL },
|
||||
#ifdef GLXEXT
|
||||
{ GlxExtensionInit, "GLX", &glxSupported },
|
||||
#endif
|
||||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dmxExtensions); i++)
|
||||
LoadExtension(&dmxExtensions[i], TRUE);
|
||||
}
|
||||
|
||||
/** This routine is called in Xserver/dix/main.c from \a main(). */
|
||||
void
|
||||
InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
||||
|
@ -594,7 +611,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
|||
static unsigned long dmxGeneration = 0;
|
||||
|
||||
#ifdef GLXEXT
|
||||
Bool glxSupported = TRUE;
|
||||
static Bool glxSupported = TRUE;
|
||||
#endif
|
||||
|
||||
if (dmxGeneration != serverGeneration) {
|
||||
|
@ -725,6 +742,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
|||
glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
|
||||
#endif
|
||||
|
||||
if (serverGeneration == 1)
|
||||
dmxAddExtensions(glxSupported);
|
||||
|
||||
/* Tell dix layer about the backend displays */
|
||||
for (i = 0; i < dmxNumScreens; i++) {
|
||||
|
||||
|
|
|
@ -881,7 +881,9 @@ host_screen_from_window(Window w)
|
|||
struct EphyrHostScreen *result = NULL;
|
||||
|
||||
for (index = 0; index < HostX.n_screens; index++) {
|
||||
if (HostX.screens[index].win == w || HostX.screens[index].peer_win == w) {
|
||||
if (HostX.screens[index].win == w
|
||||
|| HostX.screens[index].peer_win == w
|
||||
|| HostX.screens[index].win_pre_existing == w) {
|
||||
result = &HostX.screens[index];
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ from The Open Group.
|
|||
#endif /* HAS_SHM */
|
||||
#include "dix.h"
|
||||
#include "miline.h"
|
||||
#include "glx_extinit.h"
|
||||
|
||||
#define VFB_DEFAULT_WIDTH 1280
|
||||
#define VFB_DEFAULT_HEIGHT 1024
|
||||
|
@ -884,12 +885,30 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
|||
|
||||
} /* end vfbScreenInit */
|
||||
|
||||
static const ExtensionModule vfbExtensions[] = {
|
||||
#ifdef GLXEXT
|
||||
{ GlxExtensionInit, "GLX", &noGlxExtension },
|
||||
#endif
|
||||
};
|
||||
|
||||
static
|
||||
void vfbExtensionInit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(vfbExtensions); i++)
|
||||
LoadExtension(&vfbExtensions[i], TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
InitOutput(ScreenInfo * screenInfo, int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
int NumFormats = 0;
|
||||
|
||||
if (serverGeneration == 1)
|
||||
vfbExtensionInit();
|
||||
|
||||
/* initialize pixmap formats */
|
||||
|
||||
/* must have a pixmap depth to match every screen depth */
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
/*
|
||||
* DDX-specific extensions.
|
||||
*/
|
||||
static ExtensionModule extensionModules[] = {
|
||||
static const ExtensionModule extensionModules[] = {
|
||||
#ifdef XF86VIDMODE
|
||||
{
|
||||
XFree86VidModeExtensionInit,
|
||||
|
|
|
@ -47,7 +47,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
static MODULESETUPPROTO(glxSetup);
|
||||
|
||||
static ExtensionModule GLXExt = {
|
||||
static const ExtensionModule GLXExt = {
|
||||
GlxExtensionInit,
|
||||
"GLX",
|
||||
&noGlxExtension
|
||||
|
|
|
@ -145,7 +145,7 @@ QuartzSetupScreen(int index,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static ExtensionModule quartzExtensions[] = {
|
||||
static const ExtensionModule quartzExtensions[] = {
|
||||
/* PseudoramiX needs to be done before RandR, so
|
||||
* it is in miinitext.c until it can be reordered.
|
||||
* { PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension },
|
||||
|
|
|
@ -97,6 +97,6 @@ extern _X_EXPORT void InitExtensions(int argc, char **argv);
|
|||
|
||||
extern _X_EXPORT void CloseDownExtensions(void);
|
||||
|
||||
extern _X_EXPORT void LoadExtension(ExtensionModule *ext, Bool external);
|
||||
extern _X_EXPORT void LoadExtension(const ExtensionModule *ext, Bool external);
|
||||
|
||||
#endif /* EXTENSION_H */
|
||||
|
|
|
@ -68,10 +68,6 @@ extern _X_EXPORT Bool noDbeExtension;
|
|||
extern void DbeExtensionInit(void);
|
||||
#endif
|
||||
|
||||
#ifdef DMXEXT
|
||||
extern void DMXExtensionInit(void);
|
||||
#endif
|
||||
|
||||
#if defined(DPMSExtension)
|
||||
#include <X11/extensions/dpmsconst.h>
|
||||
extern _X_EXPORT Bool noDPMSExtension;
|
||||
|
|
|
@ -365,7 +365,7 @@ NewExtensionModule(void)
|
|||
}
|
||||
|
||||
void
|
||||
LoadExtension(ExtensionModule * e, Bool builtin)
|
||||
LoadExtension(const ExtensionModule * e, Bool builtin)
|
||||
{
|
||||
ExtensionModule *newext;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user