diff options
author | Keith Packard <keithp@keithp.com> | 2011-03-17 23:48:52 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-17 23:48:52 -0700 |
commit | d5b16b037b8fe12ba85c68c8289b6a8cc5e3a09d (patch) | |
tree | 38b4d32afa0143d36d1d1eaeb5fc393dcf9654ea /hw/xwin | |
parent | dc9ce695a69ca0787f58f8d160212a7a41acb703 (diff) |
Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class"
This reverts commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad.
The drivers used the top bits of the usage_hint to store driver
private flags (intel, radeon, nouveau).
With EXA we need to get at this data so if we migrate the pixmap we
can create the correct type of pixmap in the driver, however this
commit truncates the usage_hint into 8-bit class and loses all the
good stuff.
Signed-off-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xwin')
-rw-r--r-- | hw/xwin/win.h | 2 | ||||
-rw-r--r-- | hw/xwin/winpixmap.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 606645f9f..3f40fdbe0 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -1069,7 +1069,7 @@ winSetEngineFunctionsPrimaryDD (ScreenPtr pScreen); PixmapPtr winCreatePixmapNativeGDI (ScreenPtr pScreen, int width, int height, int depth, - unsigned class); + unsigned usage_hint); Bool winDestroyPixmapNativeGDI (PixmapPtr pPixmap); diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c index 62717f31b..8bd8e3478 100644 --- a/hw/xwin/winpixmap.c +++ b/hw/xwin/winpixmap.c @@ -57,7 +57,7 @@ winCopyRotatePixmapNativeGDI (PixmapPtr psrcPix, PixmapPtr *ppdstPix, PixmapPtr winCreatePixmapNativeGDI (ScreenPtr pScreen, int iWidth, int iHeight, - int iDepth, unsigned class) + int iDepth, unsigned usage_hint) { winPrivPixmapPtr pPixmapPriv = NULL; PixmapPtr pPixmap = NULL; @@ -72,13 +72,13 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen, #if CYGDEBUG winDebug ("winCreatePixmap () - w %d h %d d %d uh %d bw %d\n", - iWidth, iHeight, iDepth, class, + iWidth, iHeight, iDepth, usage_hint, PixmapBytePad (iWidth, iDepth)); #endif /* Setup pixmap values */ pPixmap->drawable.type = DRAWABLE_PIXMAP; - pPixmap->drawable.class = class; + pPixmap->drawable.class = 0; pPixmap->drawable.pScreen = pScreen; pPixmap->drawable.depth = iDepth; pPixmap->drawable.bitsPerPixel = BitsPerPixel (iDepth); @@ -91,6 +91,7 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen, pPixmap->devKind = 0; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = NULL; + pPixmap->usage_hint = usage_hint; /* Pixmap privates are allocated by AllocatePixmap */ pPixmapPriv = winGetPixmapPriv (pPixmap); |