+2006-03-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * image.c [MAC_OS] (XPutPixel, XGetPixel)
+ [!WORDS_BIG_ENDIAN && USE_CG_DRAWING]: Don't use specialized
+ version when depth is 32.
+ (mac_create_cg_image_from_image) [MAC_OS && USE_CG_DRAWING]: New
+ function.
+ (prepare_image_for_display) [MAC_OS && USE_CG_DRAWING]: Use it.
+ (x_clear_image_1) [MAC_OS && USE_CG_DRAWING]: Release CGImage.
+
+ * macterm.c (XCreatePixmap) [!WORDS_BIG_ENDIAN && USE_CG_DRAWING]:
+ Create GWorld in ARGB pixel format.
+ (mac_copy_area, mac_copy_area_with_mask) [USE_CG_DRAWING]: Remove
+ functions.
+ (x_draw_image_foreground) [USE_CG_DRAWING]: Use mac_draw_cg_image
+ instead of mac_copy_area/mac_copy_area_with_mask.
+
2006-03-15 Kim F. Storm <storm@cua.dk>
* xdisp.c (extend_face_to_end_of_line): Always add space glyph to
SetPortWindowPort (w);
SetRect (&r, 0, 0, width, height);
- err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
+#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
+ if (depth == 1)
+#endif
+ err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
+#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
+ else
+ /* CreateCGImageFromPixMaps requires ARGB format. */
+ err = QTNewGWorld (&pixmap, k32ARGBPixelFormat, &r, NULL, NULL, 0);
+#endif
if (err != noErr)
return NULL;
return pixmap;
#endif
+#if !USE_CG_DRAWING
/* Mac replacement for XCopyArea: dest must be window. */
static void
{
Rect src_r, dest_r;
-#if USE_CG_DRAWING
- mac_prepare_for_quickdraw (f);
-#endif
SetPortWindowPort (FRAME_MAC_WINDOW (f));
SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
{
Rect src_r, dest_r;
-#if USE_CG_DRAWING
- mac_prepare_for_quickdraw (f);
-#endif
SetPortWindowPort (FRAME_MAC_WINDOW (f));
SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
}
+#endif /* !USE_CG_DRAWING */
/* Mac replacement for XCopyArea: used only for scrolling. */
{
x_set_glyph_string_clipping (s);
+#if USE_CG_DRAWING
+ mac_draw_cg_image (s->img->data.ptr_val,
+ s->f, s->gc, s->slice.x, s->slice.y,
+ s->slice.width, s->slice.height, x, y, 1);
+#endif
if (s->img->mask)
+#if !USE_CG_DRAWING
mac_copy_area_with_mask (s->img->pixmap, s->img->mask,
s->f, s->gc, s->slice.x, s->slice.y,
s->slice.width, s->slice.height, x, y);
+#else
+ ;
+#endif
else
{
+#if !USE_CG_DRAWING
mac_copy_area (s->img->pixmap,
s->f, s->gc, s->slice.x, s->slice.y,
s->slice.width, s->slice.height, x, y);
+#endif
/* When the image has a mask, we can expect that at
least part of a mouse highlight or a block cursor will