PICT_a2b10g10r10, PICT_x2b10g10r10, and their newly-added RGB equivalents aren't currently available for clients to use. Does that patch seem reasonable?

---
render/picture.c |   11 +++++++++++
render/picture.h |    5 +++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/render/picture.c b/render/picture.c
index 5f86c7c..71230a2 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -311,6 +311,17 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
               nformats = addFormat (formats, nformats,
                                     PICT_x8b8g8r8, pDepth->depth);
           }
+           if (pDepth->depth >= 30)
+           {
+               nformats = addFormat (formats, nformats,
+                                     PICT_a2r10g10b10, pDepth->depth);
+               nformats = addFormat (formats, nformats,
+                                     PICT_x2r10g10b10, pDepth->depth);
+               nformats = addFormat (formats, nformats,
+                                     PICT_a2b10g10r10, pDepth->depth);
+               nformats = addFormat (formats, nformats,
+                                     PICT_x2b10g10r10, pDepth->depth);
+           }
           break;
       }
    }
diff --git a/render/picture.h b/render/picture.h
index 1f90f43..f3fec0b 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -67,6 +67,11 @@ typedef struct _Picture              *PicturePtr;

/* 32bpp formats */
typedef enum _PictFormatShort {
+    PICT_a2r10g10b10 = PIXMAN_a2r10g10b10,
+    PICT_x2r10g10b10 = PIXMAN_x2r10g10b10,
+    PICT_a2b10g10r10 = PIXMAN_a2b10g10r10,
+    PICT_x2b10g10r10 = PIXMAN_x2b10g10r10,
+
    PICT_a8r8g8b8 =    PIXMAN_a8r8g8b8,
    PICT_x8r8g8b8 =    PIXMAN_x8r8g8b8,
    PICT_a8b8g8r8 =    PIXMAN_a8b8g8r8,
--
1.6.0.4


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
>From 7495d36d1e9fd0ddfaa868c7628486591cac3f50 Mon Sep 17 00:00:00 2001
From: Pierre-Loup A. Griffais <[email protected]>
Date: Mon, 27 Jul 2009 20:58:44 +0200
Subject: [PATCH] Add 4 missing 10bpc picture formats to the server format list.

---
 render/picture.c |   11 +++++++++++
 render/picture.h |    5 +++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/render/picture.c b/render/picture.c
index 5f86c7c..71230a2 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -311,6 +311,17 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
 		nformats = addFormat (formats, nformats,
 				      PICT_x8b8g8r8, pDepth->depth);
 	    }
+	    if (pDepth->depth >= 30)
+	    {
+		nformats = addFormat (formats, nformats,
+				      PICT_a2r10g10b10, pDepth->depth);
+		nformats = addFormat (formats, nformats,
+				      PICT_x2r10g10b10, pDepth->depth);
+		nformats = addFormat (formats, nformats,
+				      PICT_a2b10g10r10, pDepth->depth);
+		nformats = addFormat (formats, nformats,
+				      PICT_x2b10g10r10, pDepth->depth);
+	    }
 	    break;
 	}
     }
diff --git a/render/picture.h b/render/picture.h
index 1f90f43..f3fec0b 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -67,6 +67,11 @@ typedef struct _Picture		*PicturePtr;
 
 /* 32bpp formats */
 typedef enum _PictFormatShort {
+    PICT_a2r10g10b10 =	PIXMAN_a2r10g10b10,
+    PICT_x2r10g10b10 =	PIXMAN_x2r10g10b10,
+    PICT_a2b10g10r10 =	PIXMAN_a2b10g10r10,
+    PICT_x2b10g10r10 =	PIXMAN_x2b10g10r10,
+
     PICT_a8r8g8b8 =	PIXMAN_a8r8g8b8,
     PICT_x8r8g8b8 =	PIXMAN_x8r8g8b8,
     PICT_a8b8g8r8 =	PIXMAN_a8b8g8r8,
-- 
1.6.0.4

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to