summaryrefslogtreecommitdiffstats
path: root/qemu/pixman/test/pdf-op-test.c
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/pixman/test/pdf-op-test.c
parenta14b48d18a9ed03ec191cf16b162206998a895ce (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/pdf-op-test.c')
-rw-r--r--qemu/pixman/test/pdf-op-test.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/qemu/pixman/test/pdf-op-test.c b/qemu/pixman/test/pdf-op-test.c
deleted file mode 100644
index dcb3a603a..000000000
--- a/qemu/pixman/test/pdf-op-test.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include <stdlib.h>
-#include "utils.h"
-
-static const pixman_op_t pdf_ops[] =
-{
- PIXMAN_OP_MULTIPLY,
- PIXMAN_OP_SCREEN,
- PIXMAN_OP_OVERLAY,
- PIXMAN_OP_DARKEN,
- PIXMAN_OP_LIGHTEN,
- PIXMAN_OP_COLOR_DODGE,
- PIXMAN_OP_COLOR_BURN,
- PIXMAN_OP_HARD_LIGHT,
- PIXMAN_OP_SOFT_LIGHT,
- PIXMAN_OP_DIFFERENCE,
- PIXMAN_OP_EXCLUSION,
- PIXMAN_OP_HSL_HUE,
- PIXMAN_OP_HSL_SATURATION,
- PIXMAN_OP_HSL_COLOR,
- PIXMAN_OP_HSL_LUMINOSITY
-};
-
-static const uint32_t pixels[] =
-{
- 0x00808080,
- 0x80123456,
- 0x00000000,
- 0xffffffff,
- 0x00ffffff,
- 0x80808080,
- 0x00123456,
-};
-
-int
-main ()
-{
- int o, s, m, d;
-
- enable_divbyzero_exceptions();
-
- for (o = 0; o < ARRAY_LENGTH (pdf_ops); ++o)
- {
- pixman_op_t op = pdf_ops[o];
-
- for (s = 0; s < ARRAY_LENGTH (pixels); ++s)
- {
- pixman_image_t *src;
-
- src = pixman_image_create_bits (
- PIXMAN_a8r8g8b8, 1, 1, (uint32_t *)&(pixels[s]), 4);
-
- for (m = -1; m < ARRAY_LENGTH (pixels); ++m)
- {
- pixman_image_t *msk = NULL;
- if (m >= 0)
- {
- msk = pixman_image_create_bits (
- PIXMAN_a8r8g8b8, 1, 1, (uint32_t *)&(pixels[m]), 4);
- }
-
- for (d = 0; d < ARRAY_LENGTH (pixels); ++d)
- {
- pixman_image_t *dst;
- uint32_t dp = pixels[d];
-
- dst = pixman_image_create_bits (
- PIXMAN_a8r8g8b8, 1, 1, &dp, 4);
-
- pixman_image_composite (op, src, msk, dst,
- 0, 0, 0, 0, 0, 0, 1, 1);
-
- pixman_image_unref (dst);
- }
- if (msk)
- pixman_image_unref (msk);
- }
-
- pixman_image_unref (src);
- }
- }
-
- return 0;
-}