Commit 7ad8fe5e authored by Miles Bader's avatar Miles Bader
Browse files

Merge from emacs--rel--22

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1356
parents d62672f3 4874e088
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.
......
......@@ -379,12 +379,10 @@ mac_create_cg_image_from_image (f, img)
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 @@ image_load_image_io (f, img, type)
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;
......
......@@ -521,21 +521,14 @@ XDrawLine (display, p, gc, x1, y1, x2, y2)
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 @@ XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth)
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));
......
......@@ -601,7 +601,13 @@ enum {
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;
......
......@@ -38,6 +38,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "lisp.h"
#include "keyboard.h"
#include "frame.h"
#include "dispextern.h"
#include "blockinput.h"
#include "termhooks.h"
#include "w32heap.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment