Re: [PATCH] fbdev: Support of TrueColor and Directcolor of video hardware

2013-09-11 Thread Kristian Høgsberg
On Tue, Sep 03, 2013 at 04:47:43PM +0200, mchalain [marc.chal...@gmail.com] 
wrote:
 From: mchalain marc.chal...@gmail.com

Thanks, committed.

Kristian

 backend check the type of the framebuffer and accept DirectColor and TrueColor
 I use a switch case to implement other cases in the future.
 ---
  src/compositor-fbdev.c |   11 +--
  1 file changed, 9 insertions(+), 2 deletions(-)
 
 diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
 index 9c3d17e..dd3a71d 100644
 --- a/src/compositor-fbdev.c
 +++ b/src/compositor-fbdev.c
 @@ -242,8 +242,15 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
   return 0;
  
   /* We only handle true-colour frame buffers at the moment. */
 - if (finfo-visual != FB_VISUAL_TRUECOLOR || vinfo-grayscale != 0)
 - return 0;
 + switch(finfo-visual) {
 + case FB_VISUAL_TRUECOLOR:
 + case FB_VISUAL_DIRECTCOLOR:
 + if (vinfo-grayscale != 0)
 + return 0;
 + break;
 + default:
 + return 0;
 + }
  
   /* We only support formats with MSBs on the left. */
   if (vinfo-red.msb_right != 0 || vinfo-green.msb_right != 0 ||
 -- 
 1.7.9.5
 
 ___
 wayland-devel mailing list
 wayland-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH] fbdev: Support of TrueColor and Directcolor of video hardware

2013-09-03 Thread mchalain [marc.chal...@gmail.com]
From: mchalain marc.chal...@gmail.com

backend check the type of the framebuffer and accept DirectColor and TrueColor
I use a switch case to implement other cases in the future.
---
 src/compositor-fbdev.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index 9c3d17e..dd3a71d 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -242,8 +242,15 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
return 0;
 
/* We only handle true-colour frame buffers at the moment. */
-   if (finfo-visual != FB_VISUAL_TRUECOLOR || vinfo-grayscale != 0)
-   return 0;
+   switch(finfo-visual) {
+   case FB_VISUAL_TRUECOLOR:
+   case FB_VISUAL_DIRECTCOLOR:
+   if (vinfo-grayscale != 0)
+   return 0;
+   break;
+   default:
+   return 0;
+   }
 
/* We only support formats with MSBs on the left. */
if (vinfo-red.msb_right != 0 || vinfo-green.msb_right != 0 ||
-- 
1.7.9.5

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel