and only allocating space for a pointer instead of an image.
* Combine src and mask
*/
static FASTCALL void
-fbCombineMaskU (uint32_t *src, const uint32_t *mask, int width)
+pixman_fbCombineMaskU (uint32_t *src, const uint32_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
fbCombineConjointGeneralU (dest, src, width, CombineXor);
}
-static CombineFuncU fbCombineFuncU[] = {
+static CombineFuncU pixman_fbCombineFuncU[] = {
fbCombineClear,
fbCombineSrcU,
NULL, /* CombineDst */
fbCombineConjointGeneralC (dest, src, mask, width, CombineXor);
}
-static CombineFuncC fbCombineFuncC[] = {
+static CombineFuncC pixman_fbCombineFuncC[] = {
fbCombineClearC,
fbCombineSrcC,
NULL, /* Dest */
};
-FbComposeFunctions composeFunctions = {
- fbCombineFuncU,
- fbCombineFuncC,
- fbCombineMaskU
+FbComposeFunctions pixman_composeFunctions = {
+ pixman_fbCombineFuncU,
+ pixman_fbCombineFuncC,
+ pixman_fbCombineMaskU
};
uint32_t *, uint32_t);
void
-fbCompositeRect (const FbComposeData *data, uint32_t *scanline_buffer)
+pixmanCompositeRect (const FbComposeData *data, uint32_t *scanline_buffer)
{
uint32_t *src_buffer = scanline_buffer;
uint32_t *dest_buffer = src_buffer + data->width;
if (!store)
{
-#if 0
- int bpp;
-
-#if 0
- fbGetDrawable (data->dest->pDrawable, bits, stride, bpp, xoff, yoff);
-#endif
-#endif
bits = data->dest->bits.bits;
stride = data->dest->bits.rowstride;
xoff = yoff = 0;
PIXMAN_FORMAT_RGB (data->mask->bits.format))
{
uint32_t *mask_buffer = dest_buffer + data->width;
- CombineFuncC compose = composeFunctions.combineC[data->op];
+ CombineFuncC compose = pixman_composeFunctions.combineC[data->op];
if (!compose)
return;
else
{
uint32_t *src_mask_buffer = 0, *mask_buffer = 0;
- CombineFuncU compose = composeFunctions.combineU[data->op];
+ CombineFuncU compose = pixman_composeFunctions.combineU[data->op];
if (!compose)
return;
0xff000000);
if (mask_buffer)
- composeFunctions.combineMaskU (src_buffer,
+ pixman_composeFunctions.combineMaskU (src_buffer,
mask_buffer,
data->width);
static pixman_image_t *
allocate_image (void)
{
- pixman_image_t *image = malloc (sizeof (pixman_image_t *));
+ pixman_image_t *image = malloc (sizeof (pixman_image_t));
if (image)
{
pixman_image_t *image;
linear_gradient_t *linear;
- return_val_if_fail (n_stops < 2, NULL);
+ return_val_if_fail (n_stops >= 2, NULL);
image = allocate_image();
pixman_image_t *image;
radial_gradient_t *radial;
- return_val_if_fail (n_stops < 2, NULL);
+ return_val_if_fail (n_stops >= 2, NULL);
image = allocate_image();
{
image_common_t *common = (image_common_t *)image;
- if (!region)
+ if (region)
{
pixman_region_copy (&common->clip_region, region);
}
uint32_t _scanline_buffer[SCANLINE_BUFFER_LENGTH * 3];
uint32_t *scanline_buffer = _scanline_buffer;
+ return_if_fail (src_img != NULL);
+ return_if_fail (dest_img != NULL);
+
if (width > SCANLINE_BUFFER_LENGTH)
{
scanline_buffer = (uint32_t *)malloc (width * 3 * sizeof (uint32_t));
compose_data.width = width;
compose_data.height = height;
- fbCompositeRect (&compose_data, scanline_buffer);
+ pixmanCompositeRect (&compose_data, scanline_buffer);
if (scanline_buffer != _scanline_buffer)
free (scanline_buffer);
int PictureTransformPoint3d (pixman_transform_t *trans,
pixman_vector_t *vector);
-void fbCompositeRect (const FbComposeData *data,
- uint32_t *scanline_buffer);
+void pixmanCompositeRect (const FbComposeData *data,
+ uint32_t *scanline_buffer);
pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
0, 0, 0, 0, 0, 0, 10, 10);
+ pixman_image_unref (src_img);
+ pixman_image_unref (dest_img);
+
return 0;
}