diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-02-05 13:04:07 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-02-05 13:04:07 +0100 |
commit | 8f652339cd39bbcc715ac01344e6015dfcdef93f (patch) | |
tree | 59251da15bfcc6f52d683a122079457b3abeee1d /unix/xserver/hw/vnc/vncHooks.c | |
parent | cf661bff54a6fafaac068753f1f80fc6741599f6 (diff) | |
download | tigervnc-8f652339cd39bbcc715ac01344e6015dfcdef93f.tar.gz tigervnc-8f652339cd39bbcc715ac01344e6015dfcdef93f.zip |
Fix for RENDER hooks on Xorg < 1.12
TriFan and TriStrip were added in 1.12, so we need to have that code
conditional to support older versions of Xorg.
Diffstat (limited to 'unix/xserver/hw/vnc/vncHooks.c')
-rw-r--r-- | unix/xserver/hw/vnc/vncHooks.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c index 38dac928..c0d9f7c6 100644 --- a/unix/xserver/hw/vnc/vncHooks.c +++ b/unix/xserver/hw/vnc/vncHooks.c @@ -74,9 +74,11 @@ typedef struct _vncHooksScreenRec { CompositeRectsProcPtr CompositeRects; TrapezoidsProcPtr Trapezoids; TrianglesProcPtr Triangles; +#if PICTURE_SCREEN_VERSION >= 2 TriStripProcPtr TriStrip; TriFanProcPtr TriFan; #endif +#endif #ifdef RANDR RRSetConfigProcPtr rrSetConfig; RRScreenSetSizeProcPtr rrScreenSetSize; @@ -163,6 +165,7 @@ static void vncHooksTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, static void vncHooksTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris); +#if PICTURE_SCREEN_VERSION >= 2 static void vncHooksTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoint, xPointFixed * points); @@ -170,6 +173,7 @@ static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoint, xPointFixed * points); #endif +#endif #ifdef RANDR static Bool vncHooksRandRSetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); @@ -329,8 +333,10 @@ int vncHooksInit(int scrIdx) wrap(vncHooksScreen, ps, CompositeRects, vncHooksCompositeRects); wrap(vncHooksScreen, ps, Trapezoids, vncHooksTrapezoids); wrap(vncHooksScreen, ps, Triangles, vncHooksTriangles); +#if PICTURE_SCREEN_VERSION >= 2 wrap(vncHooksScreen, ps, TriStrip, vncHooksTriStrip); wrap(vncHooksScreen, ps, TriFan, vncHooksTriFan); +#endif } #endif #ifdef RANDR @@ -489,8 +495,10 @@ static Bool vncHooksCloseScreen(ScreenPtr pScreen_) unwrap(vncHooksScreen, ps, CompositeRects); unwrap(vncHooksScreen, ps, Trapezoids); unwrap(vncHooksScreen, ps, Triangles); +#if PICTURE_SCREEN_VERSION >= 2 unwrap(vncHooksScreen, ps, TriStrip); unwrap(vncHooksScreen, ps, TriFan); +#endif } #endif #ifdef RANDR @@ -1067,6 +1075,8 @@ static void vncHooksTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, RENDER_EPILOGUE(Triangles); } +#if PICTURE_SCREEN_VERSION >= 2 + static void vncHooksTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoint, xPointFixed * points) @@ -1185,6 +1195,8 @@ static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, RENDER_EPILOGUE(TriFan); } +#endif /* PICTURE_SCREEN_VERSION */ + #endif /* RENDER */ #ifdef RANDR |