]> git.eshelyaron.com Git - emacs.git/commitdiff
(XDrawLine, XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sun, 4 May 2008 00:32:24 +0000 (00:32 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sun, 4 May 2008 00:32:24 +0000 (00:32 +0000)
Create bitmap context in native byte order.

src/ChangeLog
src/macterm.c

index c0e2fe08390f81fb05ca32a9ce5956c1b2592142..f5b038846e93c7c86b702829b16439e6dd2e3538 100644 (file)
@@ -1,3 +1,11 @@
+2008-05-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * image.c [USE_MAC_IMAGE_IO] (image_load_image_io):
+       Create bitmap context in native byte order.
+
+       * macterm.c (XDrawLine, XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]:
+       Create bitmap context in native byte order.
+
 2008-05-03  Eli Zaretskii  <eliz@gnu.org>
 
        * dired.c (Ffile_attributes): Don't allow the device number become
index 0023c8988a0252490b4d3882a7cbb3d346433b1c..8886cdb565bbc5adbe0cde6ee62af31fd4fc4442 100644 (file)
@@ -415,7 +415,11 @@ XDrawLine (display, p, gc, x1, y1, x2, y2)
   if (ximg->bits_per_pixel == 32)
     {
       color_space = mac_cg_color_space_rgb;
-      alpha_info = kCGImageAlphaNoneSkipFirst;
+      alpha_info = (kCGImageAlphaNoneSkipFirst
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+                   | kCGBitmapByteOrder32Host
+#endif
+                   );
     }
   else
     {
@@ -743,7 +747,11 @@ XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth)
   context = CGBitmapContextCreate (pixmap->data, width, height, 8,
                                   pixmap->bytes_per_line,
                                   mac_cg_color_space_rgb,
-                                  kCGImageAlphaNoneSkipFirst);
+                                  kCGImageAlphaNoneSkipFirst
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+                                  | kCGBitmapByteOrder32Host
+#endif
+                                  );
 
   CG_SET_FILL_COLOR (context, fg);
   CGContextFillRect (context, CGRectMake (0, 0, width, height));