gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog gui/gtk_glue_agg.cpp


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog gui/gtk_glue_agg.cpp
Date: Wed, 01 Aug 2007 16:47:05 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/08/01 16:47:04

Modified files:
        .              : ChangeLog 
        gui            : gtk_glue_agg.cpp 

Log message:
        gui/gtk_glue_agg.cpp: Support the OLPC again

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3898&r2=1.3899
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk_glue_agg.cpp?cvsroot=gnash&r1=1.25&r2=1.26

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.3898
retrieving revision 1.3899
diff -u -b -r1.3898 -r1.3899
--- ChangeLog   1 Aug 2007 15:56:53 -0000       1.3898
+++ ChangeLog   1 Aug 2007 16:47:04 -0000       1.3899
@@ -1,3 +1,7 @@
+2007-08-01 Udo Giacomozzi <address@hidden>
+
+       * gui/gtk_glue_agg.cpp: Support the OLPC again
+
 2007-08-01 Sandro Santilli <address@hidden>
 
        * server/asobj/: Boolean.cpp, Number.cpp, string.cpp:

Index: gui/gtk_glue_agg.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/gui/gtk_glue_agg.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- gui/gtk_glue_agg.cpp        1 Aug 2007 13:16:40 -0000       1.25
+++ gui/gtk_glue_agg.cpp        1 Aug 2007 16:47:04 -0000       1.26
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: gtk_glue_agg.cpp,v 1.25 2007/08/01 13:16:40 udog Exp $ */
+/* $Id: gtk_glue_agg.cpp,v 1.26 2007/08/01 16:47:04 udog Exp $ */
 
 
 /// \page gtk_shm_support GTK shared memory extension support
@@ -238,17 +238,30 @@
 GtkAggGlue::detect_pixelformat() 
 {
 
-  // <UdoG>: Currently there is NO detection of the pixel format used by the 
-  // X server. I tried with gdk_visual_get_system() and gdk_visual_get_best() 
-  // but they return the /hardware/ pixel format, which is not what we want.
-  // Normally any X server will use RGB24, regardless of video hardware.
-  // Only the OLPC has a hacked(?) X server that expects RGB565 data.
-  // I dropped support for the OLPC to make GTK-AGG work for normal X servers.
-  // We need to find a detection method that works in both cases...  
+  // By definition, GTK/GDK *always* expects RGB24 data for 
+  // gdk_draw_rgb_image(). However, we want to support the OLPC which uses a 
+  // hacked GTK that works with RGB565 data.
+  
+#ifdef PIXELFORMAT_RGB24   // normal case 
   
   _bpp = 24;
   strcpy(_pixelformat, "RGB24");
   
+#else
+
+#ifdef PIXELFORMAT_RGB565  // OLPC
+
+  _bpp = 16;
+  strcpy(_pixelformat, "RGB565");
+  
+#else
+
+#error Missing a supported pixel format for GTK GUI. You probably want to 
configure --with-pixelformat=RGB24   
+
+#endif  //ifdef PIXELFORMAT_RGB565   
+ 
+#endif  //ifdef PIXELFORMAT_RGB24
+  
   return true;
   
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]