(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.
This commit is contained in:
parent
c7fea3257f
commit
e09ce637d3
2 changed files with 39 additions and 7 deletions
|
@ -1,3 +1,20 @@
|
|||
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
|
||||
|
|
|
@ -653,7 +653,15 @@ XCreatePixmap (display, w, width, height, depth)
|
|||
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;
|
||||
|
@ -1336,6 +1344,7 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
|
|||
#endif
|
||||
|
||||
|
||||
#if !USE_CG_DRAWING
|
||||
/* Mac replacement for XCopyArea: dest must be window. */
|
||||
|
||||
static void
|
||||
|
@ -1349,9 +1358,6 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y)
|
|||
{
|
||||
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);
|
||||
|
@ -1396,9 +1402,6 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
|
|||
{
|
||||
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);
|
||||
|
@ -1431,6 +1434,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
|
|||
|
||||
RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
|
||||
}
|
||||
#endif /* !USE_CG_DRAWING */
|
||||
|
||||
|
||||
/* Mac replacement for XCopyArea: used only for scrolling. */
|
||||
|
@ -3285,15 +3289,26 @@ x_draw_image_foreground (s)
|
|||
{
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue