This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

VNC - add true color 0888


-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: net/vnc_server/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/vnc_server/current/ChangeLog,v
retrieving revision 1.5
diff -u -5 -p -r1.5 ChangeLog
--- net/vnc_server/current/ChangeLog	16 Sep 2003 14:15:12 -0000	1.5
+++ net/vnc_server/current/ChangeLog	24 Oct 2003 19:04:07 -0000
@@ -1,45 +1,51 @@
+2003-10-24  Gary Thomas  <gary@mlbassoc.com>
+
+	* tests/vnc-test.c: 
+	* src/vnc-server.c: 
+	* include/vnc-server.h: 
+	* cdl/vnc-server.cdl: Add support for 32 bit framebufer (0/8/8/8)
+
 2003-09-16  Chris Garry  <cgarry@sweeneydesign.co.uk>
 
-    * doc/vnc-server.html:
-    * src/vnc-server.c:
-    * include/vnc-server.h:
-    Added new function VncCopyBuffer2RectMask().
+	* doc/vnc-server.html:
+	* src/vnc-server.c:
+	* include/vnc-server.h:
+	Added new function VncCopyBuffer2RectMask().
 
-    * tests/vnc-test.c:
-    Modifed to include a cursor.
+	* tests/vnc-test.c:
+	Modifed to include a cursor.
 
 2003-09-02  Chris Garry  <cgarry@sweeneydesign.co.uk>
 
-    * tests/vnc-test.c:
-    * doc/vnc-server.html:
-    Modified for new BGR233 mode.
-
+	* tests/vnc-test.c:
+	* doc/vnc-server.html:
+	Modified for new BGR233 mode.
 
 2003-09-01  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/vnc-server.c: 
 	* include/vnc-server.h: 
 	* cdl/vnc-server.cdl: Add support for BGR233 (8 bit) mode, since
 	newer viewers support this on all displays.
 
 2003-08-31  Chris Garry  <cgarry@sweeneydesign.co.uk>
 
-    * src/vnc-server.c:
-    Always send colour data to client in big endian format.
-    When doing frame updates, do not call send command until there
-    if 1460 bytes of data unless the data is all that is left for the
-    cuurent frame update (huge improvement with lwIP stack).
-    Fixed bug where VncPrintf() did not handle characters not defined
-    for the selected font.
-    VncPrintf() does not mark tiles for update when do_print argument
-    is not set.
-    
-    * tests/vnc-test.c:
-    Modifed the test to use select() function.  Added more examples
-    of using the VNC server API.
-    
+	* src/vnc-server.c:
+	Always send colour data to client in big endian format.
+	When doing frame updates, do not call send command until there
+	if 1460 bytes of data unless the data is all that is left for the
+	cuurent frame update (huge improvement with lwIP stack).
+	Fixed bug where VncPrintf() did not handle characters not defined
+	for the selected font.
+	VncPrintf() does not mark tiles for update when do_print argument
+	is not set.
+	
+	* tests/vnc-test.c:
+	Modifed the test to use select() function.  Added more examples
+	of using the VNC server API.
+	
 2003-08-22  Chris Garry  <cgarry@sweeneydesign.co.uk>
 
 	* tests/vnc-test.c: 
 
 	* src/fonts/winFreeSystem14x16.c: 
Index: net/vnc_server/current/cdl/vnc-server.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/vnc_server/current/cdl/vnc-server.cdl,v
retrieving revision 1.2
diff -u -5 -p -r1.2 vnc-server.cdl
--- net/vnc_server/current/cdl/vnc-server.cdl	2 Sep 2003 01:43:35 -0000	1.2
+++ net/vnc_server/current/cdl/vnc-server.cdl	24 Oct 2003 18:49:38 -0000
@@ -194,10 +194,18 @@ cdl_package CYGPKG_VNC_SERVER {
             flavor bool
             default_value 0
             implements CYGNUM_VNC_SERVER_PIXEL_SELECTED
             description "This selects 16-bit, RGB565 pixel format."
         }
+
+        cdl_option CYGNUM_VNC_SERVER_PIXEL_TRUECOLOR0888 {
+            display     "True Color pixel format (32-bit)"
+            flavor bool
+            default_value 0
+            implements CYGNUM_VNC_SERVER_PIXEL_SELECTED
+            description "This selects 32-bit, TRUECOLOR0888 pixel format."
+        }
         
         cdl_option CYGNUM_VNC_SERVER_INCLUDE_VNC_PRINTF {
             display "Include VncPrintf() function"
             flavor        bool
             default_value 1
Index: net/vnc_server/current/include/vnc-server.h
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/vnc_server/current/include/vnc-server.h,v
retrieving revision 1.3
diff -u -5 -p -r1.3 vnc-server.h
--- net/vnc_server/current/include/vnc-server.h	16 Sep 2003 14:15:12 -0000	1.3
+++ net/vnc_server/current/include/vnc-server.h	24 Oct 2003 18:49:38 -0000
@@ -62,10 +62,11 @@ typedef struct
     void *     frame_buffer;
     bool       rgb332;
     bool       rgb555;
     bool       rgb565;
     bool       bgr233;
+    bool       truecolor0888;
 } vnc_frame_format_t;
 
 
 #ifdef CYGNUM_VNC_SERVER_INCLUDE_VNC_PRINTF
 /* The typedefs for MWIMAGEBITS and MWCFONT and required to use  */
@@ -99,10 +100,13 @@ typedef struct
 typedef cyg_uint8 vnc_color_t;
 typedef cyg_uint8 vnc_colour_t;
 #elif defined(CYGNUM_VNC_SERVER_PIXEL_RGB555) || defined(CYGNUM_VNC_SERVER_PIXEL_RGB565)
 typedef cyg_uint16 vnc_color_t;
 typedef cyg_uint16 vnc_colour_t;
+#elif defined(CYGNUM_VNC_SERVER_PIXEL_TRUECOLOR0888)
+typedef cyg_uint32 vnc_color_t;
+typedef cyg_uint32 vnc_colour_t;
 #else
 #error "Unsupported color model"
 #endif
 
 
@@ -145,10 +149,15 @@ vnc_printf_return_t VncPrintf(MWCFONT* f
 #endif
 #ifdef CYGNUM_VNC_SERVER_PIXEL_RGB565
 #define VNC_RGB2COL(r,g,b) (vnc_colour_t)(((((cyg_uint8)r)&0xF8) << 8)  \
                                        |((((cyg_uint8)g)&0xFC) << 3)  \
                                        |((((cyg_uint8)b)&0xF8) >> 3))
+#endif
+#ifdef CYGNUM_VNC_SERVER_PIXEL_TRUECOLOR0888
+#define VNC_RGB2COL(r,g,b) (vnc_colour_t)(((((cyg_uint8)r)&0xFF) << 16)  \
+                                       |((((cyg_uint8)g)&0xFF) << 8)  \
+                                       |((((cyg_uint8)b)&0xFF) << 0))
 #endif
 
 
 /* 16 defined colours for application use */
 #define VNC_BLACK       VNC_RGB2COL( 0  , 0  , 0   )
Index: net/vnc_server/current/src/vnc-server.c
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/vnc_server/current/src/vnc-server.c,v
retrieving revision 1.4
diff -u -5 -p -r1.4 vnc-server.c
--- net/vnc_server/current/src/vnc-server.c	16 Sep 2003 14:15:12 -0000	1.4
+++ net/vnc_server/current/src/vnc-server.c	24 Oct 2003 18:46:56 -0000
@@ -125,10 +125,21 @@ void lwip_init(void);
 #define RED_SHIFT           11
 #define GREEN_SHIFT         5
 #define BLUE_SHIFT          0
 #endif
 
+#ifdef CYGNUM_VNC_SERVER_PIXEL_TRUECOLOR0888
+#define BITS_PER_PIXEL      32     /* Bits per pixel */
+#define PIXEL_DEPTH         24     /* Usefull bits per pixel */
+#define RED_MAX             255
+#define GREEN_MAX           255
+#define BLUE_MAX            255
+#define RED_SHIFT           16
+#define GREEN_SHIFT         8
+#define BLUE_SHIFT          0
+#endif
+
 /* Client to Server message types */
 #define SET_PIXEL_FORMAT         0
 #define FIX_COLOUR_MAP_ENTRIES   1
 #define SET_ENCODINGS            2
 #define FRAME_BUFFER_UPDATE_REQ  3
@@ -240,14 +251,20 @@ vnc_frame_format_t frame_format = {CYGNU
                                    1,
 #else
                                    0,
 #endif
 #ifdef CYGNUM_VNC_SERVER_PIXEL_BGR233
-                                   1};
+                                   1,
+#else
+                                   0,
+#endif
+#ifdef CYGNUM_VNC_SERVER_PIXEL_TRUECOLOR0888
+                                   1,
 #else
-                                   0};
+                                   0,
 #endif
+};
 
 
 /* Structure to hold the encoding type details */
 volatile struct encoding_type_struct
 {
Index: net/vnc_server/current/tests/vnc-test.c
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/vnc_server/current/tests/vnc-test.c,v
retrieving revision 1.4
diff -u -5 -p -r1.4 vnc-test.c
--- net/vnc_server/current/tests/vnc-test.c	16 Sep 2003 14:15:12 -0000	1.4
+++ net/vnc_server/current/tests/vnc-test.c	24 Oct 2003 18:49:37 -0000
@@ -150,10 +150,14 @@ int main()
     }
     else if (display_info->bgr233)
     {
         VncPrintf(0, 1, VNC_BLACK, 1, 345, "Pixel format: BGR233");
     }
+    else if (display_info->truecolor0888)
+    {
+        VncPrintf(0, 1, VNC_BLACK, 1, 345, "Pixel format: TrueColor0888");
+    }
     else
     {
         VncPrintf(0, 1, VNC_BLACK, 1, 345, "Pixel format: Unknown");
     }
 
Index: services/gfx/mw/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/services/gfx/mw/current/ChangeLog,v
retrieving revision 1.10
diff -u -5 -p -r1.10 ChangeLog
--- services/gfx/mw/current/ChangeLog	24 Oct 2003 18:15:52 -0000	1.10
+++ services/gfx/mw/current/ChangeLog	24 Oct 2003 19:05:01 -0000
@@ -1,7 +1,9 @@
 2003-10-24  Gary Thomas  <gary@mlbassoc.com>
 
+	* src/drivers/scr_vnc_ecos.c: Support true color (32 bit) 0888 format.
+
 	* src/demos/nanox/ntetris.c (main): Start with a good known
 	state (by zeroing) - otherwise, the results are unpredictable
 	and often crash.
 
 2003-09-03  Gary Thomas  <gary@mlbassoc.com>
@@ -13,14 +15,14 @@
 	Protect against null [curmodifiers] pointer.  Reported
 	by Eric Doenges <Eric.Doenges@DynaPel.com>
 
 2003-09-01  Chris Garry <cgarry@sweeneydesign.co.uk>
 
-    * src/ecos/ecos_app.c:
-    * src/ecos/ecos_init.c:
-    Do not use ARM display hardware setup routines when VNC server
-    drivers are used.
+	* src/ecos/ecos_app.c:
+	* src/ecos/ecos_init.c:
+	Do not use ARM display hardware setup routines when VNC server
+	drivers are used.
 
 2003-09-01  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/nanox/client.c: 
 	* src/mwin/wingdi.c: 
@@ -53,31 +55,31 @@
 	* cdl/microwindows.cdl: Add support for building complete
 	application via CDL.  Also better selection of demos to run.
 
 2003-08-22  Chris Garry <cgarry@sweeneydesign.co.uk>
 
-    * cdl/microwindows.cdl
-    Added support for VNC server.
-    
-    * src/include/device.h:
-    Remove COLOR2PIXEL555 hack for strongarm lcd when VNC server screen
-    driver is used.
-    
-    * src/nanox/clientfb.c:
-    Removed assumption that CYGPKG_HAL_ARM means target is a strongarm
-    lcd when VNC server is used.
-    
-    * src/drivers/kbd_vnc_ecos.c:
-    * src/drivers/mou_vnc_ecos.c:
-    * src/drivers/scr_vnc_ecos.c:
-    New keyboard, mouse and screen drivers for VNC server.
+	* cdl/microwindows.cdl
+	Added support for VNC server.
+	
+	* src/include/device.h:
+	Remove COLOR2PIXEL555 hack for strongarm lcd when VNC server screen
+	driver is used.
+	
+	* src/nanox/clientfb.c:
+	Removed assumption that CYGPKG_HAL_ARM means target is a strongarm
+	lcd when VNC server is used.
+	
+	* src/drivers/kbd_vnc_ecos.c:
+	* src/drivers/mou_vnc_ecos.c:
+	* src/drivers/scr_vnc_ecos.c:
+	New keyboard, mouse and screen drivers for VNC server.
 
 2003-07-21  Chris Garry <cgarry@sweeneydesign.co.uk>
 
-    * src/nanox/client.c
-    Set the length field in the sockaddr_in structure name before
-    trying to connect to the server.
+	* src/nanox/client.c
+	Set the length field in the sockaddr_in structure name before
+	trying to connect to the server.
 
 2003-06-13  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* cdl/microwindows.cdl: eCos Microwindows requires an IPv4 stack.
 
Index: services/gfx/mw/current/src/drivers/scr_vnc_ecos.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/services/gfx/mw/current/src/drivers/scr_vnc_ecos.c,v
retrieving revision 1.2
diff -u -5 -p -r1.2 scr_vnc_ecos.c
--- services/gfx/mw/current/src/drivers/scr_vnc_ecos.c	2 Sep 2003 02:42:37 -0000	1.2
+++ services/gfx/mw/current/src/drivers/scr_vnc_ecos.c	24 Oct 2003 18:56:28 -0000
@@ -181,10 +181,16 @@ static PSD vnc_open(PSD psd)
     {
         psd->bpp = 8;
         psd->ncolors = 0xFF + 1;
         psd->pixtype = MWPF_TRUECOLOR233;
     }
+    else if (frame_format->truecolor0888)
+    {
+        psd->bpp = 32;
+        psd->ncolors = 0xFFFFFF + 1;
+        psd->pixtype = MWPF_TRUECOLOR0888;
+    }
     else
     {
         EPRINTF("Unsupported display type\n");
         goto fail;
     }
@@ -247,10 +253,15 @@ static void vnc_getscreeninfo(PSD psd,PM
         break;
     case MWPF_TRUECOLOR565:
         psi->rmask = 0xf800;
         psi->gmask = 0x07e0;
         psi->bmask = 0x001f;
+        break;
+    case MWPF_TRUECOLOR0888:
+        psi->rmask = 0xFF0000;
+        psi->gmask = 0x00FF00;
+        psi->bmask = 0x0000FF;
         break;
     default:
         printf("%s - unsupported pixtype\n", __FUNCTION__);
         psi->rmask = 0xff;
         psi->gmask = 0xff;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]