changeset 97034:5b5b0194f293

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1356
author Miles Bader <miles@gnu.org>
date Sat, 26 Jul 2008 09:13:26 +0000
parents 51b8e9670c45 (current diff) 159b77870cd1 (diff)
children 837d18731242
files src/ChangeLog src/image.c src/macterm.c src/macterm.h src/w32inevt.c
diffstat 5 files changed, 34 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Jul 26 09:13:11 2008 +0000
+++ b/src/ChangeLog	Sat Jul 26 09:13:26 2008 +0000
@@ -1,3 +1,22 @@
+2008-07-26 YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macterm.c (XDrawLine) [USE_MAC_IMAGE_IO]: Remove spurious return.
+
+2008-07-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macterm.h (kCGBitmapByteOrder32Host): New define for
+	non-universal SDKs.
+
+	* image.c (mac_create_cg_image_from_image, image_load_image_io)
+	[USE_MAC_IMAGE_IO]: Remove conditionals for kCGBitmapByteOrder32Host.
+
+	* macterm.c (XDrawLine, XCreatePixmapFromBitmapData)
+	[USE_MAC_IMAGE_IO]: Remove conditionals for kCGBitmapByteOrder32Host.
+
+2008-07-26  David Robinow  <drobinow@gmail.com>  (tiny change)
+
+        * w32inevt.c: Include dispextern.h.
+
 2008-07-26  Andreas Schwab  <schwab@suse.de>
 
 	* print.c (print_object): Fix off-by-one in last change.
--- a/src/image.c	Sat Jul 26 09:13:11 2008 +0000
+++ b/src/image.c	Sat Jul 26 09:13:26 2008 +0000
@@ -379,12 +379,10 @@
   ximg->data = NULL;
   result = CGImageCreate (ximg->width, ximg->height, 8, 32,
 			  ximg->bytes_per_line, mac_cg_color_space_rgb,
-			  (img->mask ? kCGImageAlphaPremultipliedFirst
-			   : kCGImageAlphaNoneSkipFirst)
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
-			  | kCGBitmapByteOrder32Host
-#endif
-			  , provider, NULL, 0, kCGRenderingIntentDefault);
+			  ((img->mask ? kCGImageAlphaPremultipliedFirst
+			    : kCGImageAlphaNoneSkipFirst)
+			   | kCGBitmapByteOrder32Host),
+			  provider, NULL, 0, kCGRenderingIntentDefault);
   CGDataProviderRelease (provider);
   UNBLOCK_INPUT;
 
@@ -2827,10 +2825,7 @@
 				   ximg->bytes_per_line,
 				   mac_cg_color_space_rgb,
 				   kCGImageAlphaNoneSkipFirst
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
-				   | kCGBitmapByteOrder32Host
-#endif
-				   );
+				   | kCGBitmapByteOrder32Host);
   if (has_alpha_p)
     {
       Lisp_Object specified_bg;
--- a/src/macterm.c	Sat Jul 26 09:13:11 2008 +0000
+++ b/src/macterm.c	Sat Jul 26 09:13:26 2008 +0000
@@ -521,21 +521,14 @@
   if (ximg->bits_per_pixel == 32)
     {
       color_space = mac_cg_color_space_rgb;
-      alpha_info = (kCGImageAlphaNoneSkipFirst
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
-		    | kCGBitmapByteOrder32Host
-#endif
-		    );
+      alpha_info = kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host;
     }
   else
     {
       color_space = NULL;
       alpha_info = kCGImageAlphaOnly;
     }
-  if (color_space == NULL)
-    return;
-  context = CGBitmapContextCreate (ximg->data, ximg->width,
-				   ximg->height, 8,
+  context = CGBitmapContextCreate (ximg->data, ximg->width, ximg->height, 8,
 				   ximg->bytes_per_line, color_space,
 				   alpha_info);
   if (ximg->bits_per_pixel == 32)
@@ -855,10 +848,7 @@
 				   pixmap->bytes_per_line,
 				   mac_cg_color_space_rgb,
 				   kCGImageAlphaNoneSkipFirst
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
-				   | kCGBitmapByteOrder32Host
-#endif
-				   );
+				   | kCGBitmapByteOrder32Host);
 
   CG_SET_FILL_COLOR (context, fg);
   CGContextFillRect (context, CGRectMake (0, 0, width, height));
--- a/src/macterm.h	Sat Jul 26 09:13:11 2008 +0000
+++ b/src/macterm.h	Sat Jul 26 09:13:26 2008 +0000
@@ -601,7 +601,13 @@
   kEventParamWindowMouseLocation = 'wmou'
 };
 #endif
+
+/* kCGBitmapByteOrder32Host is defined in Universal SDK for 10.4 but
+   not in PPC SDK for 10.4.0.  */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 && !defined (kCGBitmapByteOrder32Host)
+#define kCGBitmapByteOrder32Host 0
 #endif
+#endif	/* MAC_OSX */
 
 struct frame;
 struct face;
--- a/src/w32inevt.c	Sat Jul 26 09:13:11 2008 +0000
+++ b/src/w32inevt.c	Sat Jul 26 09:13:26 2008 +0000
@@ -38,6 +38,7 @@
 #include "lisp.h"
 #include "keyboard.h"
 #include "frame.h"
+#include "dispextern.h"
 #include "blockinput.h"
 #include "termhooks.h"
 #include "w32heap.h"