[Spice-commits] 4 commits - spice/draw.h spice/enums.h spice/qxl_dev.h

Gerd Hoffmann kraxel at kemper.freedesktop.org
Wed Jun 30 13:32:54 PDT 2010


 spice/draw.h    |   18 +++++++-----------
 spice/enums.h   |   16 ----------------
 spice/qxl_dev.h |    6 ++++++
 3 files changed, 13 insertions(+), 27 deletions(-)

New commits:
commit 4cf3b18f62c55885be159aa666451d56c91d03ed
Author: Alexander Larsson <alexl at redhat.com>
Date:   Wed Jun 30 16:46:25 2010 +0200

    Simplify SpiceLineAttr by removing unused elements and enums

diff --git a/spice/draw.h b/spice/draw.h
index da748ef..abf778f 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -251,11 +251,7 @@ typedef struct SPICE_ATTR_PACKED SpiceBlackness {
 
 typedef struct SPICE_ATTR_PACKED SpiceLineAttr {
     uint8_t flags;
-    uint8_t join_style;
-    uint8_t end_style;
     uint8_t style_nseg;
-    SPICE_FIXED28_4 width;
-    SPICE_FIXED28_4 miter_limit;
     SPICE_ADDRESS style; //data[0] ?
 } SpiceLineAttr;
 
diff --git a/spice/enums.h b/spice/enums.h
index 153356c..3317536 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -201,22 +201,6 @@ enum SpiceLineFlags {
     SPICE_LINE_FLAGS_MASK = 0xc
 };
 
-enum SpiceLineCap {
-    SPICE_LINE_CAP_ROUND,
-    SPICE_LINE_CAP_SQUARE,
-    SPICE_LINE_CAP_BUTT,
-
-    SPICE_LINE_CAP_ENUM_END
-};
-
-enum SpiceLineJoin {
-    SPICE_LINE_JOIN_ROUND,
-    SPICE_LINE_JOIN_BEVEL,
-    SPICE_LINE_JOIN_MITER,
-
-    SPICE_LINE_JOIN_ENUM_END
-};
-
 enum SpiceStringFlags {
     SPICE_STRING_FLAGS_RASTER_A1 = (1 << 0),
     SPICE_STRING_FLAGS_RASTER_A4 = (1 << 1),
commit 36126f5ee37799b959036e0e47abec279e864942
Author: Alexander Larsson <alexl at redhat.com>
Date:   Tue Jun 29 21:26:34 2010 +0200

    Change SpicePath.size to SpicePath.num_segments
    
    We now track the number of segments rather than the memory size
    of the path internally.

diff --git a/spice/draw.h b/spice/draw.h
index 475a58a..da748ef 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -71,7 +71,7 @@ typedef struct SPICE_ATTR_PACKED SpicePathSeg {
 } SpicePathSeg;
 
 typedef struct SPICE_ATTR_PACKED SpicePath {
-  uint32_t size;
+  uint32_t num_segments;
   SpicePathSeg segments[0]; /* alert: variable size elements */
 } SpicePath;
 
commit eb96d4ec74b56432d2b7315c50b362fb750bd5b7
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Tue Jun 29 16:25:42 2010 +0200

    make SpiceRect compatible with pixman_box32

diff --git a/spice/draw.h b/spice/draw.h
index 6a13bf9..475a58a 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -58,10 +58,10 @@ typedef struct SPICE_ATTR_PACKED SpicePoint16 {
 } SpicePoint16;
 
 typedef struct SPICE_ATTR_PACKED SpiceRect {
-    int32_t top;
     int32_t left;
-    int32_t bottom;
+    int32_t top;
     int32_t right;
+    int32_t bottom;
 } SpiceRect;
 
 typedef struct SPICE_ATTR_PACKED SpicePathSeg {
commit 65f9bef4fecd1ac46d9cca31158c49d46fb2797a
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Fri Jun 25 16:21:50 2010 +0200

    qxl abi: zap SPICE_ADDRESS for clip rects and paths.

diff --git a/spice/draw.h b/spice/draw.h
index dee444b..6a13bf9 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -67,12 +67,12 @@ typedef struct SPICE_ATTR_PACKED SpiceRect {
 typedef struct SPICE_ATTR_PACKED SpicePathSeg {
     uint32_t flags;
     uint32_t count;
-    uint8_t data[0];
+    SpicePointFix points[0];
 } SpicePathSeg;
 
 typedef struct SPICE_ATTR_PACKED SpicePath {
   uint32_t size;
-  uint8_t segments[0];
+  SpicePathSeg segments[0]; /* alert: variable size elements */
 } SpicePath;
 
 typedef struct SPICE_ATTR_PACKED SpiceClipRects {
@@ -82,7 +82,7 @@ typedef struct SPICE_ATTR_PACKED SpiceClipRects {
 
 typedef struct SPICE_ATTR_PACKED SpiceClip {
     uint32_t type;
-    SPICE_ADDRESS data;
+    SpiceClipRects *rects;
 } SpiceClip;
 
 typedef struct SPICE_ATTR_PACKED SpicePattern {
@@ -260,7 +260,7 @@ typedef struct SPICE_ATTR_PACKED SpiceLineAttr {
 } SpiceLineAttr;
 
 typedef struct SPICE_ATTR_PACKED SpiceStroke {
-    SPICE_ADDRESS path;
+    SpicePath *path;
     SpiceLineAttr attr;
     SpiceBrush brush;
     uint16_t fore_mode;
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index a059e12..47f0ce7 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -522,6 +522,12 @@ enum {
     QXL_PATH_BEZIER = (1 << 4),
 };
 
+typedef struct SPICE_ATTR_PACKED QXLPathSeg {
+    uint32_t flags;
+    uint32_t count;
+    QXLPointFix points[0];
+} QXLPathSeg;
+
 typedef struct SPICE_ATTR_PACKED QXLPath {
     uint32_t data_size;
     QXLDataChunk chunk;


More information about the Spice-commits mailing list