freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master 0370748: * graph/x11/grx11.c (gr_x11_device_ini


From: Alexei Podtelezhnikov
Subject: [freetype2-demos] master 0370748: * graph/x11/grx11.c (gr_x11_device_init): Prioritize 32-bit formats.
Date: Sat, 20 Jun 2020 21:59:25 -0400 (EDT)

branch: master
commit 03707489a8399672a5853c1e29a8fbfc3b93bbf6
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    * graph/x11/grx11.c (gr_x11_device_init): Prioritize 32-bit formats.
---
 ChangeLog         |  4 ++++
 graph/x11/grx11.c | 16 ++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 47d3542..f245511 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-06-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
+       * graph/x11/grx11.c (gr_x11_device_init): Prioritize 32-bit formats.
+
+2020-06-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
        * graph/x11/grx11.c (gr_x11_convert_*): Clean up `uint32'.
        (gr_x11_device_init): Display logging.
 
diff --git a/graph/x11/grx11.c b/graph/x11/grx11.c
index 744079f..3077338 100644
--- a/graph/x11/grx11.c
+++ b/graph/x11/grx11.c
@@ -878,16 +878,16 @@ typedef  unsigned long   uint32;
 
   static const grX11Format*  gr_x11_formats[] =
   {
-    &gr_x11_format_rgb565,
-    &gr_x11_format_bgr565,
-    &gr_x11_format_rgb555,
-    &gr_x11_format_bgr555,
-    &gr_x11_format_rgb888,
-    &gr_x11_format_bgr888,
     &gr_x11_format_rgb0888,
     &gr_x11_format_bgr0888,
     &gr_x11_format_rgb8880,
     &gr_x11_format_bgr8880,
+    &gr_x11_format_rgb888,
+    &gr_x11_format_bgr888,
+    &gr_x11_format_rgb565,
+    &gr_x11_format_bgr565,
+    &gr_x11_format_rgb555,
+    &gr_x11_format_bgr555,
     NULL
   };
 
@@ -956,9 +956,9 @@ typedef  unsigned long   uint32;
       formats      = XListPixmapFormats( x11dev.display, &count );
 
       /* compare to the list of supported formats first */
-      for ( format = formats; count > 0; count--, format++ )
+      for ( pformat = gr_x11_formats; *pformat; pformat++ )
       {
-        for ( pformat = gr_x11_formats; *pformat; pformat++ )
+        for ( format = formats; count > 0; count--, format++ )
         {
           if ( format->depth          != (*pformat)->x_depth          ||
                format->bits_per_pixel != (*pformat)->x_bits_per_pixel )



reply via email to

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