summaryrefslogtreecommitdiff
path: root/decode_render.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2001-10-15 16:33:22 +0000
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-05-04 18:13:24 -0700
commit30392c1e635663e5b3eb5771d8ce4c852cada4b8 (patch)
tree969059d432863edb9ae608f90a20047c94c5902d /decode_render.c
parent062412a066cc62635c1d1eb99999ee774775ca6f (diff)
downloadxscope-30392c1e635663e5b3eb5771d8ce4c852cada4b8.tar.gz
Add SHM decoding
Diffstat (limited to 'decode_render.c')
-rw-r--r--decode_render.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/decode_render.c b/decode_render.c
index 8f6252a..c0c379a 100644
--- a/decode_render.c
+++ b/decode_render.c
@@ -130,6 +130,28 @@ PrintPICTFORMAT(buf)
return(4);
}
+PrintPICTFORMINFO(buf)
+ unsigned char *buf;
+{
+ /* print a PictFormInfo */
+ long n = ILong(buf);
+ short t = IByte(buf+4);
+ short d = IByte(buf+5);
+
+ fprintf (stdout, "PICTFORMINFO %08x %s %d ",
+ n, t == 0 ? "Indexed" : "Direct", d);
+ if (t == 0) {
+ long c = ILong(buf+20);
+ fprintf (stdout, "cmap %08x", c);
+ } else {
+ short r = IShort(buf+8);
+ short g = IShort(buf+12);
+ short b = IShort(buf+16);
+ short a = IShort(buf+20);
+ fprintf (stdout, "%d %d %d %d", a, r, g, b);
+ }
+}
+
PrintGLYPHSET(buf)
unsigned char *buf;
{
@@ -200,11 +222,15 @@ InitializeRENDER(buf)
p = DefineType(RENDERREPLY, ENUMERATED, "RENDERREPLY", PrintENUMERATED);
DefineEValue (p, 0L, "QueryVersion");
+ DefineEValue (p, 1L, "QueryPictFormats");
+ DefineEValue (p, 2L, "QueryPictIndexValues");
+ DefineEValue (p, 3L, "QueryDithers");
DefineType(PICTURE, BUILTIN, "PICTURE", PrintPICTURE);
DefineType(PICTFORMAT, BUILTIN, "PICTFORMAT", PrintPICTFORMAT);
DefineType(GLYPHSET, BUILTIN, "GLYPHSET", PrintGLYPHSET);
DefineType(RENDERCOLOR, BUILTIN, "RENDERCOLOR", PrintRENDERCOLOR);
+ DefineType(PICTFORMINFO, BUILTIN, "PICTFORMINFO", PrintPICTFORMINFO);
p = DefineType(PICTURE_BITMASK, SET, "PICTURE_BITMASK", PrintSET);