diff options
author | 2017-04-25 03:31:15 -0700 | |
---|---|---|
committer | 2017-05-22 06:48:08 +0000 | |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/pixman/test/oob-test.c | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/pixman/test/oob-test.c')
-rw-r--r-- | qemu/pixman/test/oob-test.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/qemu/pixman/test/oob-test.c b/qemu/pixman/test/oob-test.c deleted file mode 100644 index 0d19b504a..000000000 --- a/qemu/pixman/test/oob-test.c +++ /dev/null @@ -1,101 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include "utils.h" - -typedef struct -{ - int width; - int height; - int stride; - pixman_format_code_t format; - -} image_info_t; - -typedef struct -{ - pixman_op_t op; - - image_info_t src; - image_info_t dest; - - int src_x; - int src_y; - int dest_x; - int dest_y; - int width; - int height; -} composite_info_t; - -const composite_info_t info[] = -{ - { - PIXMAN_OP_SRC, - { 3, 6, 16, PIXMAN_a8r8g8b8 }, - { 5, 7, 20, PIXMAN_x8r8g8b8 }, - 1, 8, - 1, -1, - 1, 8 - }, - { - PIXMAN_OP_SRC, - { 7, 5, 36, PIXMAN_a8r8g8b8 }, - { 6, 5, 28, PIXMAN_x8r8g8b8 }, - 8, 5, - 5, 3, - 1, 2 - }, - { - PIXMAN_OP_OVER, - { 10, 10, 40, PIXMAN_a2b10g10r10 }, - { 10, 10, 40, PIXMAN_a2b10g10r10 }, - 0, 0, - 0, 0, - 10, 10 - }, - { - PIXMAN_OP_OVER, - { 10, 10, 40, PIXMAN_x2b10g10r10 }, - { 10, 10, 40, PIXMAN_x2b10g10r10 }, - 0, 0, - 0, 0, - 10, 10 - }, -}; - -static pixman_image_t * -make_image (const image_info_t *info) -{ - char *data = malloc (info->stride * info->height); - int i; - - for (i = 0; i < info->height * info->stride; ++i) - data[i] = (i % 255) ^ (((i % 16) << 4) | (i & 0xf0)); - - return pixman_image_create_bits (info->format, info->width, info->height, (uint32_t *)data, info->stride); -} - -static void -test_composite (const composite_info_t *info) -{ - pixman_image_t *src = make_image (&info->src); - pixman_image_t *dest = make_image (&info->dest); - - pixman_image_composite (PIXMAN_OP_SRC, src, NULL, dest, - info->src_x, info->src_y, - 0, 0, - info->dest_x, info->dest_y, - info->width, info->height); -} - - - -int -main (int argc, char **argv) -{ - int i; - - for (i = 0; i < ARRAY_LENGTH (info); ++i) - test_composite (&info[i]); - - return 0; -} |