This is just ground work for kms addition.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/Makefile.am   |  2 ++
 src/qxl_surface.c | 48 +-----------------------------------------------
 src/qxl_surface.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 47 deletions(-)
 create mode 100644 src/qxl_surface.h

diff --git a/src/Makefile.am b/src/Makefile.am
index b8d0d3e..82ed0cc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,6 +41,7 @@ qxl_drv_la_SOURCES =                          \
        qxl_driver.c                            \
        qxl_image.c                             \
        qxl_surface.c                           \
+       qxl_surface.h                           \
        qxl_ring.c                              \
        qxl_mem.c                               \
        mspace.c                                \
@@ -85,6 +86,7 @@ spiceqxl_drv_la_SOURCES =                             \
        qxl_driver.c                            \
        qxl_image.c                             \
        qxl_surface.c                           \
+       qxl_surface.h                           \
        qxl_ring.c                              \
        qxl_mem.c                               \
        mspace.c                                \
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 3da9079..84f221b 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -48,7 +48,7 @@
 #endif
 
 #include "qxl.h"
-
+#include "qxl_surface.h"
 #ifdef DEBUG_SURFACE_LIFECYCLE
 #include <stdio.h>
 
@@ -57,52 +57,6 @@ static FILE* surface_log;
 
 typedef struct evacuated_surface_t evacuated_surface_t;
 
-struct qxl_surface_t
-{
-    surface_cache_t    *cache;
-    
-    uint32_t           id;
-
-    pixman_image_t *   dev_image;
-    pixman_image_t *   host_image;
-
-    uxa_access_t       access_type;
-    RegionRec          access_region;
-
-    void *             address;
-    void *             end;
-    
-    qxl_surface_t *    next;
-    qxl_surface_t *    prev;   /* Only used in the 'live'
-                                * chain in the surface cache
-                                */
-
-    int                        in_use;
-    int                        bpp;            /* bpp of the pixmap */
-    int                        ref_count;
-
-    PixmapPtr          pixmap;
-
-    struct evacuated_surface_t *evacuated;
-
-    union
-    {
-       qxl_surface_t *copy_src;
-       Pixel          solid_pixel;
-
-       struct
-       {
-           int                 op;
-           PicturePtr          src_picture;
-           PicturePtr          mask_picture;
-           PicturePtr          dest_picture;
-           qxl_surface_t       *src;
-           qxl_surface_t       *mask;
-           qxl_surface_t       *dest;
-       } composite;
-    } u;
-};
-
 struct evacuated_surface_t
 {
     pixman_image_t     *image;
diff --git a/src/qxl_surface.h b/src/qxl_surface.h
new file mode 100644
index 0000000..450a563
--- /dev/null
+++ b/src/qxl_surface.h
@@ -0,0 +1,52 @@
+#ifndef QXL_SURFACE_H
+#define QXL_SURFACE_H
+
+struct evacuated_surface_t;
+
+struct qxl_surface_t
+{
+    surface_cache_t    *cache;
+    
+    uint32_t           id;
+
+    pixman_image_t *   dev_image;
+    pixman_image_t *   host_image;
+
+    uxa_access_t       access_type;
+    RegionRec          access_region;
+
+    void *             address;
+    void *             end;
+    
+    qxl_surface_t *    next;
+    qxl_surface_t *    prev;   /* Only used in the 'live'
+                                * chain in the surface cache
+                                */
+
+    int                        in_use;
+    int                        bpp;            /* bpp of the pixmap */
+    int                        ref_count;
+
+    PixmapPtr          pixmap;
+
+    struct evacuated_surface_t *evacuated;
+
+    union
+    {
+       qxl_surface_t *copy_src;
+       Pixel          solid_pixel;
+
+       struct
+       {
+           int                 op;
+           PicturePtr          src_picture;
+           PicturePtr          mask_picture;
+           PicturePtr          dest_picture;
+           qxl_surface_t       *src;
+           qxl_surface_t       *mask;
+           qxl_surface_t       *dest;
+       } composite;
+    } u;
+};
+
+#endif
-- 
1.8.1.2

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to