#include "regionstr.h"
#include "dixfontstr.h"
#include "colormapst.h"
-#ifdef RENDER
#include "picturestr.h"
-#endif
#include "randrstr.h"
#define DBGPRINT(x) //(fprintf x)
CursorWarpedToProcPtr CursorWarpedTo;
#endif
ScreenBlockHandlerProcPtr BlockHandler;
-#ifdef RENDER
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs;
CompositeRectsProcPtr CompositeRects;
TrianglesProcPtr Triangles;
TriStripProcPtr TriStrip;
TriFanProcPtr TriFan;
-#endif
RRSetConfigProcPtr rrSetConfig;
RRScreenSetSizeProcPtr rrScreenSetSize;
RRCrtcSetProcPtr rrCrtcSet;
#else
static void vncHooksBlockHandler(ScreenPtr pScreen, void * pTimeout);
#endif
-#ifdef RENDER
static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask,
INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int npoint, xPointFixed * points);
-#endif
static Bool vncHooksRandRSetConfig(ScreenPtr pScreen, Rotation rotation,
int rate, RRScreenSizePtr pSize);
static Bool vncHooksRandRScreenSetSize(ScreenPtr pScreen,
ScreenPtr pScreen;
vncHooksScreenPtr vncHooksScreen;
-#ifdef RENDER
PictureScreenPtr ps;
-#endif
rrScrPrivPtr rp;
pScreen = screenInfo.screens[scrIdx];
wrap(vncHooksScreen, pScreen, CursorWarpedTo, vncHooksCursorWarpedTo);
#endif
wrap(vncHooksScreen, pScreen, BlockHandler, vncHooksBlockHandler);
-#ifdef RENDER
ps = GetPictureScreenIfSet(pScreen);
if (ps) {
wrap(vncHooksScreen, ps, Composite, vncHooksComposite);
wrap(vncHooksScreen, ps, TriStrip, vncHooksTriStrip);
wrap(vncHooksScreen, ps, TriFan, vncHooksTriFan);
}
-#endif
rp = rrGetScrPriv(pScreen);
if (rp) {
/* Some RandR callbacks are optional */
static Bool vncHooksCloseScreen(ScreenPtr pScreen_)
{
-#ifdef RENDER
PictureScreenPtr ps;
-#endif
rrScrPrivPtr rp;
SCREEN_PROLOGUE(pScreen_, CloseScreen);
unwrap(vncHooksScreen, pScreen, ClearToBackground);
unwrap(vncHooksScreen, pScreen, DisplayCursor);
unwrap(vncHooksScreen, pScreen, BlockHandler);
-#ifdef RENDER
ps = GetPictureScreenIfSet(pScreen);
if (ps) {
unwrap(vncHooksScreen, ps, Composite);
unwrap(vncHooksScreen, ps, TriStrip);
unwrap(vncHooksScreen, ps, TriFan);
}
-#endif
rp = rrGetScrPriv(pScreen);
if (rp) {
unwrap(vncHooksScreen, rp, rrSetConfig);
SCREEN_EPILOGUE(BlockHandler);
}
-#ifdef RENDER
-
// Unwrap and rewrap helpers
#define RENDER_PROLOGUE(scrn,field) \
RENDER_EPILOGUE(TriFan);
}
-#endif /* RENDER */
-
// Unwrap and rewrap helpers
#define RANDR_PROLOGUE(field) \
ErrorF("-screen scrn WxHxD set screen's width, height, depth\n");
ErrorF("-pixdepths list-of-int support given pixmap depths\n");
-#ifdef RENDER
ErrorF("+/-render turn on/off RENDER extension support"
"(default on)\n");
-#endif
ErrorF("-linebias n adjust thin line pixelization\n");
ErrorF("-blackpixel n pixel value for black\n");
ErrorF("-whitepixel n pixel value for white\n");
ret = fbScreenInit(pScreen, pbits, pvfb->fb.width, pvfb->fb.height,
dpi, dpi, pvfb->fb.paddedWidth, pvfb->fb.bitsPerPixel);
-#ifdef RENDER
if (ret && Render)
ret = fbPictureInit (pScreen, 0, 0);
-#endif
if (!ret) return FALSE;