[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 8b7aaf3e56: Speed up GIF animations
From: |
Po Lu |
Subject: |
Re: master 8b7aaf3e56: Speed up GIF animations |
Date: |
Mon, 11 Apr 2022 21:19:09 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I want to copy the bitmap that we've already computed in an efficient
> way. PUT_PIXEL would be way too slow.
Not that I know of. But I suspect that this doesn't really matter since
gif_load is only called once when loading an image into the image cache.
Using memcpy cannot possibly be correct with X images either. What if
the X server demands the image be byteswapped, has odd padding
requirements, doesn't have a concept of "bits per pixel" and/or "bytes
per pixel", or has different masks for various components of a ZPixmap?
The only reliable way to deal with that mess is to use XPutPixel or
XGetPixel. (Which image.c abstracts away with the PUT_PIXEL and
GET_PIXEL macros.)