#ifdef PIXMAN_FB_ACCESSORS
#define PIXMAN_COMPOSITE_RECT_GENERAL pixman_composite_rect_general_accessors
-
-#define FETCH_PROC_FOR_PICTURE pixman_fetchProcForPicture_accessors
-#define FETCH_PIXEL_PROC_FOR_PICTURE pixman_fetchPixelProcForPicture_accessors
-#define STORE_PROC_FOR_PICTURE pixman_storeProcForPicture_accessors
-
-#define FB_FETCH_TRANSFORMED fbFetchTransformed_accessors
-#define FB_FETCH_EXTERNAL_ALPHA fbFetchExternalAlpha_accessors
-#define FB_STORE_EXTERNAL_ALPHA fbStoreExternalAlpha_accessors
-
#else
-
#define PIXMAN_COMPOSITE_RECT_GENERAL pixman_composite_rect_general_no_accessors
-
-#define FETCH_PROC_FOR_PICTURE pixman_fetchProcForPicture
-#define FETCH_PIXEL_PROC_FOR_PICTURE pixman_fetchPixelProcForPicture
-#define STORE_PROC_FOR_PICTURE pixman_storeProcForPicture
-
-#define FB_FETCH_TRANSFORMED fbFetchTransformed
-#define FB_FETCH_EXTERNAL_ALPHA fbFetchExternalAlpha
-#define FB_STORE_EXTERNAL_ALPHA fbStoreExternalAlpha
-
#endif
static unsigned int
{
uint32_t color;
uint32_t *end;
- fetchPixelProc fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetchPixelProc fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
color = fetch(pict, 0, 0);
static void fbFetch(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
{
- fetchProc fetch = FETCH_PROC_FOR_PICTURE(pict);
+ fetchProc fetch = ACCESS(pixman_fetchProcForPicture)(pict);
fetch(pict, x, y, width, buffer);
}
{
uint32_t *bits;
int32_t stride;
- storeProc store = STORE_PROC_FOR_PICTURE(pict);
+ storeProc store = ACCESS(pixman_storeProcForPicture)(pict);
const pixman_indexed_t * indexed = pict->indexed;
bits = pict->bits;
if (bits->common.alpha_map)
{
- fetchSrc = (scanFetchProc)FB_FETCH_EXTERNAL_ALPHA;
+ fetchSrc = (scanFetchProc)ACCESS(fbFetchExternalAlpha);
}
else if ((bits->common.repeat == PIXMAN_REPEAT_NORMAL || bits->common.repeat == PIXMAN_REPEAT_PAD) &&
bits->width == 1 &&
}
else
{
- fetchSrc = (scanFetchProc)FB_FETCH_TRANSFORMED;
+ fetchSrc = (scanFetchProc)ACCESS(fbFetchTransformed);
}
}
if (bits->common.alpha_map)
{
- fetchMask = (scanFetchProc)FB_FETCH_EXTERNAL_ALPHA;
+ fetchMask = (scanFetchProc)ACCESS(fbFetchExternalAlpha);
}
else if ((bits->common.repeat == PIXMAN_REPEAT_NORMAL || bits->common.repeat == PIXMAN_REPEAT_PAD) &&
bits->width == 1 && bits->height == 1)
&& bits->common.repeat != PIXMAN_REPEAT_PAD)
fetchMask = (scanFetchProc)fbFetch;
else
- fetchMask = (scanFetchProc)FB_FETCH_TRANSFORMED;
+ fetchMask = (scanFetchProc)ACCESS(fbFetchTransformed);
}
}
if (data->dest->common.alpha_map)
{
- fetchDest = (scanFetchProc)FB_FETCH_EXTERNAL_ALPHA;
- store = (scanStoreProc)FB_STORE_EXTERNAL_ALPHA;
+ fetchDest = (scanFetchProc)ACCESS(fbFetchExternalAlpha);
+ store = (scanStoreProc)ACCESS(fbStoreExternalAlpha);
if (data->op == PIXMAN_OP_CLEAR || data->op == PIXMAN_OP_SRC)
fetchDest = NULL;
#include "pixman-private.h"
-#ifdef PIXMAN_FB_ACCESSORS
-#define FETCH_PROC_FOR_PICTURE pixman_fetchProcForPicture_accessors
-#define FETCH_PIXEL_PROC_FOR_PICTURE pixman_fetchPixelProcForPicture_accessors
-#define STORE_PROC_FOR_PICTURE pixman_storeProcForPicture_accessors
-
-#define FB_FETCH_TRANSFORMED fbFetchTransformed_accessors
-#define FB_FETCH_EXTERNAL_ALPHA fbFetchExternalAlpha_accessors
-#define FB_STORE_EXTERNAL_ALPHA fbStoreExternalAlpha_accessors
-
-#else
-
-#define FETCH_PROC_FOR_PICTURE pixman_fetchProcForPicture
-#define FETCH_PIXEL_PROC_FOR_PICTURE pixman_fetchPixelProcForPicture
-#define STORE_PROC_FOR_PICTURE pixman_storeProcForPicture
-
-#define FB_FETCH_TRANSFORMED fbFetchTransformed
-#define FB_FETCH_EXTERNAL_ALPHA fbFetchExternalAlpha
-#define FB_STORE_EXTERNAL_ALPHA fbStoreExternalAlpha
-
-#endif
-
/*
* Fetch from region strategies
*/
int x, y, i;
/* initialize the two function pointers */
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
if(pixman_region_n_rects (pict->common.src_clip) == 1)
fetchFromRegion = fbFetchFromNoRegion;
int x, y, i;
/* initialize the two function pointers */
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
if(pixman_region_n_rects (pict->common.src_clip) == 1)
fetchFromRegion = fbFetchFromNoRegion;
int x, y, i;
/* initialize the two function pointers */
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
if(pixman_region_n_rects (pict->common.src_clip) == 1)
{
int i;
/* initialize the two function pointers */
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
if(pixman_region_n_rects (pict->common.src_clip) == 1)
fetchFromRegion = fbFetchFromNoRegion;
int i;
/* initialize the two function pointers */
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
if(pixman_region_n_rects (pict->common.src_clip) == 1)
fetchFromRegion = fbFetchFromNoRegion;
int i;
/* initialize the two function pointers */
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
if(pixman_region_n_rects (pict->common.src_clip) == 1)
{
int32_t cheight = pixman_fixed_to_int(params[1]);
int xoff = (params[0] - pixman_fixed_1) >> 1;
int yoff = (params[1] - pixman_fixed_1) >> 1;
- fetch = FETCH_PIXEL_PROC_FOR_PICTURE(pict);
+ fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
params += 2;
for (i = 0; i < width; ++i) {
}
void
-FB_FETCH_TRANSFORMED(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+ACCESS(fbFetchTransformed)(bits_image_t * pict, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
{
uint32_t *bits;
int32_t stride;
#define SCANLINE_BUFFER_LENGTH 2048
void
-FB_FETCH_EXTERNAL_ALPHA(bits_image_t * pict, int x, int y, int width,
- uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+ACCESS(fbFetchExternalAlpha)(bits_image_t * pict, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask,
+ uint32_t maskBits)
{
int i;
uint32_t _alpha_buffer[SCANLINE_BUFFER_LENGTH];
uint32_t *alpha_buffer = _alpha_buffer;
if (!pict->common.alpha_map) {
- FB_FETCH_TRANSFORMED (pict, x, y, width, buffer, mask, maskBits);
+ ACCESS(fbFetchTransformed) (pict, x, y, width, buffer, mask, maskBits);
return;
}
if (width > SCANLINE_BUFFER_LENGTH)
alpha_buffer = (uint32_t *) pixman_malloc_ab (width, sizeof(uint32_t));
- FB_FETCH_TRANSFORMED(pict, x, y, width, buffer, mask, maskBits);
- FB_FETCH_TRANSFORMED((bits_image_t *)pict->common.alpha_map, x - pict->common.alpha_origin.x,
- y - pict->common.alpha_origin.y, width, alpha_buffer,
- mask, maskBits);
+ ACCESS(fbFetchTransformed)(pict, x, y, width, buffer, mask, maskBits);
+ ACCESS(fbFetchTransformed)((bits_image_t *)pict->common.alpha_map, x - pict->common.alpha_origin.x,
+ y - pict->common.alpha_origin.y, width,
+ alpha_buffer, mask, maskBits);
for (i = 0; i < width; ++i) {
if (!mask || mask[i] & maskBits)
{
}
void
-FB_STORE_EXTERNAL_ALPHA(bits_image_t * pict, int x, int y, int width,
- uint32_t *buffer)
+ACCESS(fbStoreExternalAlpha)(bits_image_t * pict, int x, int y, int width,
+ uint32_t *buffer)
{
uint32_t *bits, *alpha_bits;
int32_t stride, astride;
return;
}
- store = STORE_PROC_FOR_PICTURE(pict);
- astore = STORE_PROC_FOR_PICTURE(pict->common.alpha_map);
+ store = ACCESS(pixman_storeProcForPicture)(pict);
+ astore = ACCESS(pixman_storeProcForPicture)(pict->common.alpha_map);
aindexed = pict->common.alpha_map->indexed;
ax = x;