summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-08-23 15:18:10 +0200
committerAlexander Larsson <alexl@redhat.com>2010-08-23 15:18:10 +0200
commitda7f343123bca38a1f1beb2facd2be622fe1bdbc (patch)
treeb632fc0cf8d48ec6b90cfde933e6226b6e6aa115
parent84bc7af08210a97abc486a662a138a41cf664319 (diff)
Add union to SurfaceInfo to put in next_free pointer
-rw-r--r--display/driver.c2
-rw-r--r--display/qxldd.h10
-rw-r--r--display/surface.c2
-rw-r--r--display/surface.h2
4 files changed, 10 insertions, 6 deletions
diff --git a/display/driver.c b/display/driver.c
index 1c8e1f6..f088df5 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -1268,7 +1268,7 @@ VOID APIENTRY DrvDeleteDeviceBitmap(DHSURF dhsurf)
surface = (SurfaceInfo *)dhsurf;
surface_id = GetSurfaceIdFromInfo(surface);
- DeleteDeviceBitmap(surface->pdev, surface_id, DEVICE_BITMAP_ALLOCATION_TYPE_VRAM);
+ DeleteDeviceBitmap(surface->u.pdev, surface_id, DEVICE_BITMAP_ALLOCATION_TYPE_VRAM);
}
#ifdef CALL_TEST
diff --git a/display/qxldd.h b/display/qxldd.h
index 868a1a9..7c5b6ec 100644
--- a/display/qxldd.h
+++ b/display/qxldd.h
@@ -169,10 +169,14 @@ typedef struct DrawArea {
UINT8 *base_mem;
} DrawArea;
-typedef struct SurfaceInfo {
+typedef struct SurfaceInfo SurfaceInfo;
+struct SurfaceInfo {
DrawArea draw_area;
- PDev *pdev;
-} SurfaceInfo;
+ union {
+ PDev *pdev;
+ SurfaceInfo *next_free;
+ } u;
+};
typedef struct DevRes {
MspaceInfo mspaces[NUM_MSPACES];
diff --git a/display/surface.c b/display/surface.c
index d9fc6f4..54e0d0c 100644
--- a/display/surface.c
+++ b/display/surface.c
@@ -119,7 +119,7 @@ HBITMAP CreateDeviceBitmap(PDev *pdev, SIZEL size, ULONG format, QXLPHYSICAL *ph
goto out_error2;
}
- GetSurfaceInfo(pdev, surface_id)->pdev = pdev;
+ GetSurfaceInfo(pdev, surface_id)->u.pdev = pdev;
QXLGetSurface(pdev, phys_mem, size.cx, size.cy, depth,
&stride, base_mem, allocation_type);
diff --git a/display/surface.h b/display/surface.h
index dfda502..5504793 100644
--- a/display/surface.h
+++ b/display/surface.h
@@ -7,7 +7,7 @@ static _inline UINT32 GetSurfaceIdFromInfo(SurfaceInfo *info)
{
PDev *pdev;
- pdev = info->pdev;
+ pdev = info->u.pdev;
if (info == &pdev->surface0_info) {
return 0;
}