merge from trunk
This commit is contained in:
commit
d7d5ffd611
8 changed files with 97 additions and 62 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-08-15 Ken Brown <kbrown@cornell.edu>
|
||||
|
||||
* configure.ac (G_SLICE_ALWAYS_MALLOC): Update comment.
|
||||
|
||||
2013-08-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* make-dist: Do not distribute etc/refcards TeX intermediate files.
|
||||
|
|
14
configure.ac
14
configure.ac
|
@ -4379,14 +4379,16 @@ fi
|
|||
|
||||
|
||||
case $opsys in
|
||||
dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls
|
||||
dnl memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
|
||||
dnl As malloc is not the Cygwin malloc, the Cygwin memalign always
|
||||
dnl returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */
|
||||
dnl Emacs supplies its own malloc, but glib calls posix_memalign,
|
||||
dnl and on Cygwin prior to version 1.7.24 that becomes the
|
||||
dnl Cygwin-supplied posix_memalign. As malloc is not the Cygwin
|
||||
dnl malloc, the Cygwin posix_memalign always returns ENOSYS. A
|
||||
dnl workaround is to set G_SLICE=always-malloc. This is no longer
|
||||
dnl needed starting with cygwin-1.7.24, and it is no longer
|
||||
dnl effective starting with glib-2.36. */
|
||||
cygwin)
|
||||
AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the
|
||||
G_SLICE environment variable to "always-malloc" at startup, if
|
||||
using GTK.])
|
||||
G_SLICE environment variable to "always-malloc" at startup.])
|
||||
;;
|
||||
|
||||
hpux11)
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
2013-08-15 Ken Brown <kbrown@cornell.edu>
|
||||
|
||||
* emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
|
||||
* gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
|
||||
needed.
|
||||
|
||||
2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix minor problems found by static checking.
|
||||
* frame.c (delete_frame):
|
||||
* xdisp.c (next_element_from_display_vector):
|
||||
Avoid uninitialized local.
|
||||
* image.c (imagemagick_compute_animated_image): Port to C89.
|
||||
Prefer usual GNU indentation style for loops.
|
||||
Be more careful about bizarrely large sizes, by using ptrdiff_t
|
||||
instead of int.
|
||||
|
||||
2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
Fix infinite frame selection loop (Bug#15025).
|
||||
|
@ -18,6 +35,9 @@
|
|||
|
||||
* image.c (imagemagick_compute_animated_image): Implement animated
|
||||
images (bug#14700).
|
||||
(imagemagick_compute_animated_image): Fix some compilation
|
||||
warnings. Implement a very simple cache to make the animation
|
||||
usable at all, but it should be replaced with a per-image cache.
|
||||
|
||||
2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
|
|
|
@ -699,7 +699,8 @@ main (int argc, char **argv)
|
|||
#endif
|
||||
|
||||
#ifdef G_SLICE_ALWAYS_MALLOC
|
||||
/* This is used by the Cygwin build. */
|
||||
/* This is used by the Cygwin build. It's not needed starting with
|
||||
cygwin-1.7.24, but it doesn't do any harm. */
|
||||
xputenv ("G_SLICE=always-malloc");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1197,7 +1197,8 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
|
|||
/* Don't let the frame remain selected. */
|
||||
if (f == sf)
|
||||
{
|
||||
Lisp_Object tail, frame1;
|
||||
Lisp_Object tail;
|
||||
Lisp_Object frame1 = Qnil;
|
||||
|
||||
/* Look for another visible frame on the same terminal.
|
||||
Do not call next_frame here because it may loop forever.
|
||||
|
|
|
@ -1558,15 +1558,6 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. *
|
|||
|
||||
void *(*__memalign_hook) (size_t size, size_t alignment);
|
||||
|
||||
/* As of version 1.7.24, Cygwin allows applications to provide their
|
||||
own posix_memalign (but not memalign). But posix_memalign as
|
||||
defined in this file calls memalign, so we have to rename the
|
||||
latter in order to make sure that posix_memalign calls Emacs's
|
||||
memalign. */
|
||||
#ifdef CYGWIN
|
||||
#define memalign emacs_memalign
|
||||
#endif
|
||||
|
||||
void *
|
||||
memalign (size_t alignment, size_t size)
|
||||
{
|
||||
|
|
103
src/image.c
103
src/image.c
|
@ -7871,63 +7871,80 @@ imagemagick_filename_hint (Lisp_Object spec, char hint_buffer[MaxTextExtent])
|
|||
compute ann the preceding images to be able to display a particular
|
||||
sub-image. */
|
||||
|
||||
static MagickWand *animation_cache = NULL;
|
||||
static int animation_index = 0;
|
||||
|
||||
static MagickWand *
|
||||
imagemagick_compute_animated_image (MagickWand *super_wand, int ino)
|
||||
{
|
||||
int i;
|
||||
MagickWand *composite_wand;
|
||||
|
||||
MagickSetIteratorIndex (super_wand, 0);
|
||||
composite_wand = MagickGetImage (super_wand);
|
||||
|
||||
for (int i = 1; i <= ino; i++) {
|
||||
MagickWand *sub_wand;
|
||||
PixelIterator *source_iterator, *dest_iterator;
|
||||
PixelWand **source, **dest;
|
||||
long source_width, dest_width;
|
||||
MagickPixelPacket pixel;
|
||||
if (ino == 0 || animation_cache == NULL)
|
||||
composite_wand = MagickGetImage (super_wand);
|
||||
else
|
||||
composite_wand = animation_cache;
|
||||
|
||||
MagickSetIteratorIndex (super_wand, i);
|
||||
sub_wand = MagickGetImage (super_wand);
|
||||
for (i = max (1, animation_index); i <= ino; i++)
|
||||
{
|
||||
MagickWand *sub_wand;
|
||||
PixelIterator *source_iterator, *dest_iterator;
|
||||
PixelWand **source, **dest;
|
||||
size_t source_width, dest_width;
|
||||
MagickPixelPacket pixel;
|
||||
|
||||
source_iterator = NewPixelIterator (sub_wand);
|
||||
if (! source_iterator)
|
||||
{
|
||||
DestroyMagickWand (composite_wand);
|
||||
DestroyMagickWand (sub_wand);
|
||||
image_error ("Imagemagick pixel iterator creation failed",
|
||||
Qnil, Qnil);
|
||||
return NULL;
|
||||
}
|
||||
MagickSetIteratorIndex (super_wand, i);
|
||||
sub_wand = MagickGetImage (super_wand);
|
||||
|
||||
dest_iterator = NewPixelIterator (composite_wand);
|
||||
if (! dest_iterator)
|
||||
{
|
||||
DestroyMagickWand (composite_wand);
|
||||
DestroyMagickWand (sub_wand);
|
||||
DestroyPixelIterator (source_iterator);
|
||||
image_error ("Imagemagick pixel iterator creation failed",
|
||||
Qnil, Qnil);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (source = PixelGetNextIteratorRow (source_iterator, &source_width)) {
|
||||
dest = PixelGetNextIteratorRow (dest_iterator, &dest_width);
|
||||
for (int x = 0; x < source_width; x++)
|
||||
source_iterator = NewPixelIterator (sub_wand);
|
||||
if (! source_iterator)
|
||||
{
|
||||
/* Copy over non-transparent pixels. */
|
||||
if (PixelGetAlpha (source[x]))
|
||||
{
|
||||
PixelGetMagickColor (source[x], &pixel);
|
||||
PixelSetMagickColor (dest[x], &pixel);
|
||||
}
|
||||
DestroyMagickWand (composite_wand);
|
||||
DestroyMagickWand (sub_wand);
|
||||
image_error ("Imagemagick pixel iterator creation failed",
|
||||
Qnil, Qnil);
|
||||
return NULL;
|
||||
}
|
||||
PixelSyncIterator(dest_iterator);
|
||||
|
||||
dest_iterator = NewPixelIterator (composite_wand);
|
||||
if (! dest_iterator)
|
||||
{
|
||||
DestroyMagickWand (composite_wand);
|
||||
DestroyMagickWand (sub_wand);
|
||||
DestroyPixelIterator (source_iterator);
|
||||
image_error ("Imagemagick pixel iterator creation failed",
|
||||
Qnil, Qnil);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while ((source = PixelGetNextIteratorRow (source_iterator, &source_width))
|
||||
!= NULL)
|
||||
{
|
||||
ptrdiff_t x;
|
||||
dest = PixelGetNextIteratorRow (dest_iterator, &dest_width);
|
||||
for (x = 0; x < source_width; x++)
|
||||
{
|
||||
/* Copy over non-transparent pixels. */
|
||||
if (PixelGetAlpha (source[x]))
|
||||
{
|
||||
PixelGetMagickColor (source[x], &pixel);
|
||||
PixelSetMagickColor (dest[x], &pixel);
|
||||
}
|
||||
}
|
||||
PixelSyncIterator(dest_iterator);
|
||||
}
|
||||
|
||||
DestroyPixelIterator (source_iterator);
|
||||
DestroyPixelIterator (dest_iterator);
|
||||
DestroyMagickWand (sub_wand);
|
||||
}
|
||||
|
||||
DestroyPixelIterator (source_iterator);
|
||||
DestroyPixelIterator (dest_iterator);
|
||||
DestroyMagickWand (sub_wand);
|
||||
}
|
||||
/* Cache a copy for the next iteration. The current wand will be
|
||||
destroyed by the caller. */
|
||||
animation_cache = CloneMagickWand (composite_wand);
|
||||
animation_index = ino;
|
||||
|
||||
return composite_wand;
|
||||
}
|
||||
|
|
|
@ -7550,6 +7550,7 @@ next_element_from_display_vector (struct it *it)
|
|||
/* For the last character of the box-face run, we need to look
|
||||
either at the next glyph from the display vector, or at the
|
||||
face we saw before the display vector. */
|
||||
next_face_id = it->saved_face_id;
|
||||
if (it->current.dpvec_index < it->dpend - it->dpvec - 1)
|
||||
{
|
||||
if (it->dpvec_face_id >= 0)
|
||||
|
@ -7564,8 +7565,6 @@ next_element_from_display_vector (struct it *it)
|
|||
it->saved_face_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
next_face_id = it->saved_face_id;
|
||||
next_face = FACE_FROM_ID (it->f, next_face_id);
|
||||
it->end_of_box_run_p = (this_face && this_face->box != FACE_NO_BOX
|
||||
&& (!next_face
|
||||
|
|
Loading…
Add table
Reference in a new issue