~ubuntu-branches/ubuntu/saucy/pixman/saucy-security

« back to all changes in this revision

Viewing changes to test/fetch-test.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-09-28 18:12:47 UTC
  • mfrom: (1.1.8 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090928181247-3iehog63i50htejf
Tags: 0.16.2-1
* New upstream release (closes: #546849).
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#include <stdlib.h>
3
3
#include <stdio.h>
4
4
#include "pixman.h"
5
 
 
 
5
#include <config.h>
6
6
 
7
7
#define SIZE 1024
8
8
 
9
 
 
10
9
pixman_indexed_t mono_pallete = {
11
10
    .rgba = { 0x00000000, 0x00ffffff },
12
11
};
36
35
        .format = PIXMAN_g1,
37
36
        .width = 8, .height = 2,
38
37
        .stride = 4,
 
38
#ifdef WORDS_BIGENDIAN
 
39
        .src = { 0xaa000000,
 
40
                 0x55000000 },
 
41
#else
39
42
        .src = { 0x00000055, 
40
43
                 0x000000aa },
 
44
#endif
41
45
        .dst = { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000,
42
46
                 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff },
43
47
        .indexed = &mono_pallete,
53
57
                 0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, },
54
58
    },
55
59
#endif
 
60
    /* FIXME: make this work on big endian */
56
61
    {
57
62
        .format = PIXMAN_yv12,
58
63
        .width = 8, .height = 2,
59
64
        .stride = 8,
 
65
#ifdef WORDS_BIGENDIAN
 
66
        .src = { 0x00ff00ff, 0x00ff00ff, 
 
67
                 0xff00ff00, 0xff00ff00, 
 
68
                 0x80ff8000, 
 
69
                 0x800080ff
 
70
        },
 
71
#else
60
72
        .src = { 0xff00ff00, 0xff00ff00, 
61
73
                 0x00ff00ff, 0x00ff00ff, 
62
74
                 0x0080ff80, 
63
 
                 0xff800080},
 
75
                 0xff800080
 
76
         },
 
77
#endif
64
78
        .dst = { 
65
79
                0xff000000, 0xffffffff, 0xffb80000, 0xffffe113,
66
80
                0xff000000, 0xffffffff, 0xff0023ee, 0xff4affff,