Updated to use libpixregion

This commit is contained in:
Carl Worth 2003-03-05 10:19:48 +00:00
parent 88bd3a9799
commit 2d8dfcec1b
4 changed files with 48 additions and 39 deletions

View file

@ -1,5 +1,26 @@
2003-02-25 Carl Worth <cworth@isi.edu>
* src/icimage.c (IcImageInit):
(IcImageDestroy):
(IcImageDestroyClip):
(IcClipImageReg):
(IcClipImageSrc):
(IcClipImageSrc):
(SetPictureClipRects):
(IcComputeCompositeRegion): Converted to use libpixregion rather
than region code from Xlib.
* src/iccompose.c (IcFetch_transform): Converted to use
libpixregion rather than region code from Xlib.
* src/ic.c (IcComposite): Converted to use libpixregion rather
than region code from Xlib.
2003-02-21 Carl Worth <cworth@isi.edu>
* src/ictri.c (IcRasterizeTriangle): Added triangle support to
libic.
* src/ic.h: Started cleaning up the public interface of
libic. Moved most of the cruft into icint.h.

View file

@ -25,6 +25,8 @@
#ifndef _IC_H_
#define _IC_H_
#include <stdint.h>
#include "pixregion.h"
/* icformat.c */
@ -47,7 +49,25 @@ typedef struct _IcPixels IcPixels;
IcPixels *
IcPixelsCreate (int width, int height, int depth);
/* XXX: What to do with the IcBits datatype? */
/*
* This single define controls the basic size of data manipulated
* by this software; it must be log2(sizeof (IcBits) * 8)
*/
#ifndef IC_SHIFT
# if defined(__alpha__) || defined(__alpha) || \
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || \
defined(__s390x__) || \
defined(x86_64) || defined (__x86_64__)
#define IC_SHIFT 6
typedef uint64_t IcBits;
# else
#define IC_SHIFT 5
typedef uint32_t IcBits;
# endif
#endif
IcPixels *
IcPixelsCreateForData (IcBits *data, int width, int height, int depth, int bpp, int stride);

View file

@ -22,6 +22,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* XXX: This whole file should be moved up into incint.h (and cleaned
up considerably as well) */
#ifndef _ICIMAGE_H_
#define _ICIMAGE_H_

View file

@ -40,23 +40,12 @@
#include "X11/Xprotostr.h"
#include "X11/extensions/Xrender.h"
#include "ic.h"
/* XXX: Most of this file is straight from fb.h and I imagine we can
drop quite a bit of it. Once the real ic code starts to come
together I can probably figure out what is not needed here. */
/*
* This single define controls the basic size of data manipulated
* by this software; it must be log2(sizeof (IcBits) * 8)
*/
#ifndef IC_SHIFT
#define IC_SHIFT LOG2_BITMAP_PAD
#endif
#if IC_SHIFT < LOG2_BITMAP_PAD
error IC_SHIFT must be >= LOG2_BITMAP_PAD
#endif
#define IC_UNIT (1 << IC_SHIFT)
#define IC_HALFUNIT (1 << (IC_SHIFT-1))
#define IC_MASK (IC_UNIT - 1)
@ -96,31 +85,8 @@
#define IcBitsStrideToStipStride(s) (((s) << (IC_SHIFT - IC_STIP_SHIFT)))
#define IcFullMask(n) ((n) == IC_UNIT ? IC_ALLONES : ((((IcBits) 1) << n) - 1))
#if IC_SHIFT == 6
# ifdef WIN32
typedef unsigned __int64 IcBits;
# else
# if defined(__alpha__) || defined(__alpha) || \
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || \
defined(__s390x__) || \
defined(x86_64) || defined (__x86_64__)
typedef unsigned long IcBits;
# else
typedef unsigned long long IcBits;
# endif
# endif
#endif
#if IC_SHIFT == 5
typedef CARD32 IcBits;
#endif
#if IC_SHIFT == 4
typedef CARD16 IcBits;
#endif
/* XXX: What's the significance of this distinction for IcStip? */
#if LOG2_BITMAP_PAD == IC_SHIFT
typedef IcBits IcStip;
#else
@ -760,7 +726,6 @@ IcReplicatePixel (Pixel p, int bpp);
#define CT_YXSORTED 14
#define CT_YXBANDED 18
#include "ic.h"
#include "icimage.h"
/* ictrap.c */