}
}
+#if 0
static void
fast_composite_over_8888_0888 (pixman_implementation_t *imp,
pixman_op_t op,
}
}
}
+#endif
static void
fast_composite_over_8888_0565 (pixman_implementation_t *imp,
src_x, src_y, dest_x, dest_y, width, height);
}
+#if 0
static void
mmx_composite_over_x888_8_8888 (pixman_implementation_t *imp,
pixman_op_t op,
_mm_empty ();
}
+#endif
static const pixman_fast_path_t mmx_fast_paths[] =
{
uint32_t *src = malloc (WIDTH * HEIGHT * 4);
pixman_image_t *grad_img;
pixman_image_t *alpha_img;
- pixman_image_t *solid_img;
pixman_image_t *dest_img;
pixman_image_t *src_img;
int i;
pixman_point_fixed_t p1 = { pixman_double_to_fixed (0), 0 };
pixman_point_fixed_t p2 = { pixman_double_to_fixed (WIDTH),
pixman_int_to_fixed (0) };
+#if 0
pixman_transform_t trans = {
{ { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (3), pixman_double_to_fixed (0), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (0.000), pixman_double_to_fixed (1.0) }
}
};
-
- pixman_transform_t id = {
+#else
+ pixman_transform_t trans = {
{ { pixman_fixed_1, 0, 0 },
{ 0, pixman_fixed_1, 0 },
{ 0, 0, pixman_fixed_1 } }
};
+#endif
pixman_point_fixed_t c_inner;
pixman_point_fixed_t c_outer;
pixman_fixed_t r_inner;
pixman_fixed_t r_outer;
- pixman_color_t red = { 0xffff, 0x0000, 0x0000, 0xffff };
for (i = 0; i < WIDTH * HEIGHT; ++i)
alpha[i] = 0x4f00004f; /* pale blue */
grad_img = pixman_image_create_linear_gradient (&p1, &p2,
stops, 2);
- pixman_image_set_transform (grad_img, &id);
+ pixman_image_set_transform (grad_img, &trans);
pixman_image_set_repeat (grad_img, PIXMAN_REPEAT_PAD);
pixman_image_composite (PIXMAN_OP_OVER, grad_img, NULL, alpha_img,
void *result;
#ifdef HAVE_POSIX_MEMALIGN
- posix_memalign (&result, align, size);
+ if (posix_memalign (&result, align, size) != 0)
+ result = NULL;
#else
result = malloc (size);
#endif
{ pixman_int_to_fixed (0), { 0xffff, 0x0000, 0x0000, 0xffff } },
{ pixman_int_to_fixed (1), { 0xffff, 0xffff, 0x0000, 0xffff } }
};
+#if 0
pixman_point_fixed_t p1 = { 0, 0 };
pixman_point_fixed_t p2 = { pixman_int_to_fixed (WIDTH),
pixman_int_to_fixed (HEIGHT) };
+#endif
pixman_point_fixed_t c_inner;
pixman_point_fixed_t c_outer;
pixman_fixed_t r_inner;
case 4:
*(uint32_t *)src = value;
break;
+
+ default:
+ break;
}
}
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size (window, 800, 600);
+ gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
g_signal_connect (window, "delete-event",
G_CALLBACK (gtk_main_quit),
pixman_point_fixed_t p1 = { pixman_double_to_fixed (0), 0 };
pixman_point_fixed_t p2 = { pixman_double_to_fixed (WIDTH / 8.),
pixman_int_to_fixed (0) };
+#if 0
pixman_transform_t trans = {
{ { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (3), pixman_double_to_fixed (0), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (0.000), pixman_double_to_fixed (1.0) }
}
};
-
- pixman_transform_t id = {
+#else
+ pixman_transform_t trans = {
{ { pixman_fixed_1, 0, 0 },
{ 0, pixman_fixed_1, 0 },
{ 0, 0, pixman_fixed_1 } }
};
+#endif
pixman_point_fixed_t c_inner;
pixman_point_fixed_t c_outer;
src_img = pixman_image_create_linear_gradient (&p1, &p2,
stops, 2);
- pixman_image_set_transform (src_img, &id);
+ pixman_image_set_transform (src_img, &trans);
pixman_image_set_repeat (src_img, PIXMAN_REPEAT_PAD);
pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
+#include <gtk/gtk.h>
#include "pixman.h"
void show_image (pixman_image_t *image);
+
+GdkPixbuf *pixbuf_from_argb32 (uint32_t *bits,
+ gboolean has_alpha,
+ int width,
+ int height,
+ int stride);