diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2014-02-03 15:54:56 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2014-02-03 15:54:56 +0000 |
commit | a8a9ad2eadd024d9350219461add15b4e64ffa3c (patch) | |
tree | 8f088cec9d28701fcfd2912879669f38559e1fde /driver/xf86-video-intel/src/compat-api.h | |
parent | a19c20895ddea33a894970b82e26255ffe571217 (diff) |
Update to xf86-video-intel 2.99.909
Tested by jsg@, kettenis@ and myself on a wide range of intel cards.
Diffstat (limited to 'driver/xf86-video-intel/src/compat-api.h')
-rw-r--r-- | driver/xf86-video-intel/src/compat-api.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/driver/xf86-video-intel/src/compat-api.h b/driver/xf86-video-intel/src/compat-api.h index 6b7657241..244a4860e 100644 --- a/driver/xf86-video-intel/src/compat-api.h +++ b/driver/xf86-video-intel/src/compat-api.h @@ -28,6 +28,10 @@ #ifndef COMPAT_API_H #define COMPAT_API_H +#include <xorg-server.h> +#include <xorgVersion.h> + +#include <picturestr.h> #ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR #define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] #define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p @@ -103,4 +107,63 @@ #endif +#ifndef INCLUDE_LEGACY_REGION_DEFINES +#define RegionCreate(r, s) REGION_CREATE(NULL, r, s) +#define RegionBreak(r) REGION_BREAK(NULL, r) +#define RegionSizeof REGION_SZOF +#define RegionBoxptr REGION_BOXPTR +#define RegionEnd REGION_END +#define RegionExtents(r) REGION_EXTENTS(NULL, r) +#define RegionRects REGION_RECTS +#define RegionNumRects REGION_NUM_RECTS +#define RegionContainsRect(r, b) RECT_IN_REGION(NULL, r, b) +#define RegionContainsPoint(r, x, y, b) POINT_IN_REGION(NULL, r, x, y, b) +#define RegionCopy(res, r) REGION_COPY(NULL, res, r) +#define RegionIntersect(res, r1, r2) REGION_INTERSECT(NULL, res, r1, r2) +#define RegionUnion(res, r1, r2) REGION_UNION(NULL, res, r1, r2) +#define RegionTranslate(r, x, y) REGION_TRANSLATE(NULL, r, x, y) +#define RegionUninit(r) REGION_UNINIT(NULL, r) +#define region_from_bitmap BITMAP_TO_REGION +#define RegionNil REGION_NIL +#define RegionNull(r) REGION_NULL(NULL, r) +#define RegionNotEmpty(r) REGION_NOTEMPTY(NULL, r) +#define RegionEmpty(r) REGION_EMPTY(NULL, r) +#define RegionEqual(a, b) REGION_EQUAL(NULL, a, b) +#define RegionDestroy(r) REGION_DESTROY(NULL, r) +#else +#define region_from_bitmap BitmapToRegion +#endif + +#ifndef _X_UNUSED +#define _X_UNUSED +#endif + +#if HAS_DEVPRIVATEKEYREC +#define __get_private(p, key) dixGetPrivateAddr(&(p)->devPrivates, &(key)) +#else +#define __get_private(p, key) dixLookupPrivate(&(p)->devPrivates, &(key)) +typedef int DevPrivateKeyRec; +static inline void FreePixmap(PixmapPtr pixmap) +{ + dixFreePrivates(pixmap->devPrivates); + free(pixmap); +} +#endif + +#if !HAS_DIXREGISTERPRIVATEKEY +#define dixPrivateKeyRegistered(key__) (*(key__) != 0) +#endif + +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,902,0) +#define SourceValidate(d, x, y, w, h, mode) \ + if ((d)->pScreen->SourceValidate) (d)->pScreen->SourceValidate(d, x, y, w, h, mode) +#else +#define SourceValidate(d, x, y, w, h, mode) \ + if ((d)->pScreen->SourceValidate) (d)->pScreen->SourceValidate(d, x, y, w, h) +#endif + +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0) +#define DamageUnregister(d, dd) DamageUnregister(dd) +#endif + #endif |