19ad247e8Sjmcneill#include <assert.h> 29ad247e8Sjmcneill#include <stdio.h> 39ad247e8Sjmcneill#include <stdlib.h> 49ad247e8Sjmcneill#include <string.h> 59ad247e8Sjmcneill#include "utils.h" 69ad247e8Sjmcneill 79ad247e8Sjmcneillint 89ad247e8Sjmcneillmain (int argc, char **argv) 99ad247e8Sjmcneill{ 109ad247e8Sjmcneill#define SRC_WIDTH 16 119ad247e8Sjmcneill#define SRC_HEIGHT 12 129ad247e8Sjmcneill#define DST_WIDTH 7 139ad247e8Sjmcneill#define DST_HEIGHT 2 149ad247e8Sjmcneill 159ad247e8Sjmcneill static const pixman_transform_t transform = { 169ad247e8Sjmcneill { { 0x200017bd, 0x00000000, 0x000e6465 }, 179ad247e8Sjmcneill { 0x00000000, 0x000a42fd, 0x000e6465 }, 189ad247e8Sjmcneill { 0x00000000, 0x00000000, 0x00010000 }, 199ad247e8Sjmcneill } 209ad247e8Sjmcneill }; 219ad247e8Sjmcneill pixman_image_t *src, *dest; 229ad247e8Sjmcneill 239ad247e8Sjmcneill src = pixman_image_create_bits ( 249ad247e8Sjmcneill PIXMAN_a8r8g8b8, SRC_WIDTH, SRC_HEIGHT, NULL, -1); 259ad247e8Sjmcneill dest = pixman_image_create_bits ( 269ad247e8Sjmcneill PIXMAN_a8r8g8b8, DST_WIDTH, DST_HEIGHT, NULL, -1); 279ad247e8Sjmcneill 289ad247e8Sjmcneill pixman_image_set_transform (src, &transform); 299ad247e8Sjmcneill pixman_image_set_repeat (src, PIXMAN_REPEAT_NORMAL); 309ad247e8Sjmcneill pixman_image_set_filter (src, PIXMAN_FILTER_BILINEAR, NULL, 0); 319ad247e8Sjmcneill 329ad247e8Sjmcneill if (argc == 1 || strcmp (argv[1], "-nf") != 0) 339ad247e8Sjmcneill fail_after (1, "infinite loop detected"); 349ad247e8Sjmcneill 359ad247e8Sjmcneill pixman_image_composite ( 369ad247e8Sjmcneill PIXMAN_OP_OVER, src, NULL, dest, -3, -3, 0, 0, 0, 0, 6, 2); 379ad247e8Sjmcneill 3814b11b2bSmrg pixman_image_unref (src); 3914b11b2bSmrg pixman_image_unref (dest); 4014b11b2bSmrg 419ad247e8Sjmcneill return 0; 429ad247e8Sjmcneill} 43