Author: gnorton
Date: 2007-12-04 10:07:41 -0500 (Tue, 04 Dec 2007)
New Revision: 90683

Modified:
   trunk/libgdiplus/src/ChangeLog
   trunk/libgdiplus/src/general.c
Log:
2007-12-04  Geoff Norton  <[EMAIL PROTECTED]>

        * general.c:  Optimize the code path to only check the environment
        variable once for dpi detection on the Mac.


Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog      2007-12-04 14:56:18 UTC (rev 90682)
+++ trunk/libgdiplus/src/ChangeLog      2007-12-04 15:07:41 UTC (rev 90683)
@@ -1,3 +1,8 @@
+2007-12-04  Geoff Norton  <[EMAIL PROTECTED]>
+
+       * general.c:  Optimize the code path to only check the environment
+       variable once for dpi detection on the Mac.
+
 2007-11-16  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * graphics-cairo.c: If we need to stroke, before filling, then we

Modified: trunk/libgdiplus/src/general.c
===================================================================
--- trunk/libgdiplus/src/general.c      2007-12-04 14:56:18 UTC (rev 90682)
+++ trunk/libgdiplus/src/general.c      2007-12-04 15:07:41 UTC (rev 90683)
@@ -124,11 +124,14 @@
        static float dpis = 0;
        Display* display;
 
-       if (getenv ("MONO_MWF_USE_CARBON_BACKEND") != NULL)
-               dpis = 96.0f;
        if (dpis == 0) {
                char *val;
 
+               if (getenv ("MONO_MWF_USE_CARBON_BACKEND") != NULL) {
+                       dpis = 96.0f;
+                       return dpis;
+               }
+
                display = XOpenDisplay (0);
                /* If the display is openable lets try to read dpi from it; 
otherwise use a default of 96.0f */
                if (display) {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to