summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-10-10 14:09:23 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-10-10 14:09:23 +0900
commit525879533ad1ae9b7e4ae4857d08378636ccf2f1 (patch)
tree84c99ddb72b75f532f3c2bf8c0c315bb27ea96e3
parent46e58922feb270a82a7deea2ba6bc0c777e26e4f (diff)
fixed the build break because of api change.
Summary: NOTE: need to check if the api replacements are correct or not Reviewers: Hermet, jpeg Differential Revision: https://phab.enlightenment.org/D4329
-rw-r--r--src/bin/image_data_argb.c18
-rw-r--r--src/bin/image_data_argb_alpha.c18
-rw-r--r--src/bin/image_data_ycbcr601pl.c2
-rw-r--r--src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c5
-rw-r--r--src/bin/image_data_ycbcr601pl_map_solid_rotate.c5
-rw-r--r--src/bin/image_data_ycbcr601pl_wide_stride.c7
6 files changed, 35 insertions, 20 deletions
diff --git a/src/bin/image_data_argb.c b/src/bin/image_data_argb.c
index b96ab75..5707f36 100644
--- a/src/bin/image_data_argb.c
+++ b/src/bin/image_data_argb.c
@@ -23,6 +23,7 @@ static void _setup(void)
23 int i; 23 int i;
24 Evas_Object *o; 24 Evas_Object *o;
25 void *pixels; 25 void *pixels;
26 Eina_Slice slice;
26 27
27 pixels = malloc(sizeof (int) * 640 * 480); 28 pixels = malloc(sizeof (int) * 640 * 480);
28 for (i = 0; i < 1; i++) 29 for (i = 0; i < 1; i++)
@@ -34,7 +35,8 @@ static void _setup(void)
34 efl_gfx_fill_set(o, 0, 0, 640, 480); 35 efl_gfx_fill_set(o, 0, 0, 640, 480);
35 efl_gfx_size_set(o, 640, 480); 36 efl_gfx_size_set(o, 640, 480);
36 efl_gfx_visible_set(o, EINA_TRUE); 37 efl_gfx_visible_set(o, EINA_TRUE);
37 efl_gfx_buffer_copy_set(o_images[i], pixels, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888); 38 slice = (Eina_Slice)EINA_SLICE_STR(pixels);
39 efl_gfx_buffer_copy_set(o_images[i], &slice, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888, 0);
38 } 40 }
39 free(pixels); 41 free(pixels);
40 done = 0; 42 done = 0;
@@ -52,9 +54,11 @@ static void _loop(double t, int f)
52{ 54{
53 int i, st; 55 int i, st;
54 Evas_Coord x, y, w, h; 56 Evas_Coord x, y, w, h;
57 Eina_Rw_Slice rw_slice;
58
55 for (i = 0; i < 1; i++) 59 for (i = 0; i < 1; i++)
56 { 60 {
57 unsigned int *data, *p; 61 unsigned int result, *p;
58 int length; 62 int length;
59 63
60 w = 640; 64 w = 640;
@@ -64,17 +68,17 @@ static void _loop(double t, int f)
64 efl_gfx_position_set(o_images[i], x, y); 68 efl_gfx_position_set(o_images[i], x, y);
65 efl_gfx_size_set(o_images[i], w, h); 69 efl_gfx_size_set(o_images[i], w, h);
66 efl_gfx_fill_set(o_images[i], 0, 0, w, h); 70 efl_gfx_fill_set(o_images[i], 0, 0, w, h);
67 data = efl_gfx_buffer_map(o_images[i], &length, 71 result = efl_gfx_buffer_map(o_images[i], &rw_slice,
68 EFL_GFX_BUFFER_ACCESS_MODE_WRITE, 72 EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
69 0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888, 73 0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888, 0,
70 &st); 74 &st);
71 if (!data) 75 if (!result)
72 { 76 {
73 fprintf(stderr, "ERROR: Failed to map image!\n"); 77 fprintf(stderr, "ERROR: Failed to map image!\n");
74 continue; 78 continue;
75 } 79 }
76 st = st >> 2; 80 st = st >> 2;
77 p = data; 81 p = rw_slice.mem;
78 for (y = 0; y < h; y++) 82 for (y = 0; y < h; y++)
79 { 83 {
80 for (x = 0; x < w; x++) 84 for (x = 0; x < w; x++)
@@ -84,7 +88,7 @@ static void _loop(double t, int f)
84 } 88 }
85 p += (st - w); 89 p += (st - w);
86 } 90 }
87 efl_gfx_buffer_unmap(o_images[i], data, length); 91 efl_gfx_buffer_unmap(o_images[i], &rw_slice);
88 efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h); 92 efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h);
89 } 93 }
90 FPS_STD(NAME); 94 FPS_STD(NAME);
diff --git a/src/bin/image_data_argb_alpha.c b/src/bin/image_data_argb_alpha.c
index 0493c95..a4cdabe 100644
--- a/src/bin/image_data_argb_alpha.c
+++ b/src/bin/image_data_argb_alpha.c
@@ -34,7 +34,7 @@ static void _setup(void)
34 efl_gfx_fill_set(o, 0, 0, 640, 480); 34 efl_gfx_fill_set(o, 0, 0, 640, 480);
35 efl_gfx_size_set(o, 640, 480); 35 efl_gfx_size_set(o, 640, 480);
36 efl_gfx_visible_set(o, EINA_TRUE); 36 efl_gfx_visible_set(o, EINA_TRUE);
37 efl_gfx_buffer_copy_set(o_images[i], pixels, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888); 37 efl_gfx_buffer_copy_set(o_images[i], pixels, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888, 0);
38 } 38 }
39 free(pixels); 39 free(pixels);
40 done = 0; 40 done = 0;
@@ -52,10 +52,12 @@ static void _loop(double t, int f)
52{ 52{
53 int i, st; 53 int i, st;
54 Evas_Coord x, y, w, h; 54 Evas_Coord x, y, w, h;
55 Eina_Rw_Slice rw_slice;
56
55 for (i = 0; i < 1; i++) 57 for (i = 0; i < 1; i++)
56 { 58 {
57 unsigned int *data, *p; 59 unsigned int result, *p;
58 int a, r, g, b, length; 60 int a, r, g, b;
59 61
60 w = 640; 62 w = 640;
61 h = 480; 63 h = 480;
@@ -64,17 +66,17 @@ static void _loop(double t, int f)
64 efl_gfx_position_set(o_images[i], x, y); 66 efl_gfx_position_set(o_images[i], x, y);
65 efl_gfx_size_set(o_images[i], w, h); 67 efl_gfx_size_set(o_images[i], w, h);
66 efl_gfx_fill_set(o_images[i], 0, 0, w, h); 68 efl_gfx_fill_set(o_images[i], 0, 0, w, h);
67 data = efl_gfx_buffer_map(o_images[i], &length, 69 result = efl_gfx_buffer_map(o_images[i], &rw_slice,
68 EFL_GFX_BUFFER_ACCESS_MODE_WRITE, 70 EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
69 0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888, 71 0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888, 0,
70 &st); 72 &st);
71 if (!data) 73 if (!result)
72 { 74 {
73 fprintf(stderr, "ERROR: Failed to map image!\n"); 75 fprintf(stderr, "ERROR: Failed to map image!\n");
74 continue; 76 continue;
75 } 77 }
76 st = st >> 2; 78 st = st >> 2;
77 p = data; 79 p = rw_slice.mem;
78 for (y = 0; y < h; y++) 80 for (y = 0; y < h; y++)
79 { 81 {
80 for (x = 0; x < w; x++) 82 for (x = 0; x < w; x++)
@@ -95,7 +97,7 @@ static void _loop(double t, int f)
95 } 97 }
96 p += (st - w); 98 p += (st - w);
97 } 99 }
98 efl_gfx_buffer_unmap(o_images[i], data, length); 100 efl_gfx_buffer_unmap(o_images[i], &rw_slice);
99 efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h); 101 efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h);
100 } 102 }
101 FPS_STD(NAME); 103 FPS_STD(NAME);
diff --git a/src/bin/image_data_ycbcr601pl.c b/src/bin/image_data_ycbcr601pl.c
index 2138de3..c2ca581 100644
--- a/src/bin/image_data_ycbcr601pl.c
+++ b/src/bin/image_data_ycbcr601pl.c
@@ -63,7 +63,7 @@ static void _setup(void)
63 *lp = vp + (y * 320); 63 *lp = vp + (y * 320);
64 lp++; 64 lp++;
65 } 65 }
66 efl_gfx_buffer_copy_set(o_images[i], data, 640, 480, 640 * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL); 66 efl_gfx_buffer_copy_set(o_images[i], data, 640, 480, 640 * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL, 0);
67 free(data); 67 free(data);
68 // Not a real copy in fact... 68 // Not a real copy in fact...
69 /* free(yp); */ 69 /* free(yp); */
diff --git a/src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c b/src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c
index 3dee9f8..7413d9f 100644
--- a/src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c
+++ b/src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c
@@ -25,6 +25,8 @@ static void _setup(void)
25 FILE *f; 25 FILE *f;
26 unsigned char **data, **lp; 26 unsigned char **data, **lp;
27 Evas_Object *o; 27 Evas_Object *o;
28 Eina_Slice slice;
29
28 for (i = 0; i < 1; i++) 30 for (i = 0; i < 1; i++)
29 { 31 {
30 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas); 32 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
@@ -63,7 +65,8 @@ static void _setup(void)
63 *lp = vp + (y * 320); 65 *lp = vp + (y * 320);
64 lp++; 66 lp++;
65 } 67 }
66 efl_gfx_buffer_data_set(o_images[i], data, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL); 68 slice = (Eina_Slice)EINA_SLICE_STR(*data);
69 efl_gfx_buffer_managed_set(o_images[i], &slice, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, 0);
67 free(yp); 70 free(yp);
68 free(up); 71 free(up);
69 free(vp); 72 free(vp);
diff --git a/src/bin/image_data_ycbcr601pl_map_solid_rotate.c b/src/bin/image_data_ycbcr601pl_map_solid_rotate.c
index 8c936f6..af45b33 100644
--- a/src/bin/image_data_ycbcr601pl_map_solid_rotate.c
+++ b/src/bin/image_data_ycbcr601pl_map_solid_rotate.c
@@ -25,6 +25,8 @@ static void _setup(void)
25 FILE *f; 25 FILE *f;
26 unsigned char **data, **lp; 26 unsigned char **data, **lp;
27 Evas_Object *o; 27 Evas_Object *o;
28 Eina_Slice slice;
29
28 for (i = 0; i < 1; i++) 30 for (i = 0; i < 1; i++)
29 { 31 {
30 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas); 32 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
@@ -62,7 +64,8 @@ static void _setup(void)
62 *lp = vp + (y * 320); 64 *lp = vp + (y * 320);
63 lp++; 65 lp++;
64 } 66 }
65 efl_gfx_buffer_data_set(o_images[i], data, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL); 67 slice = (Eina_Slice)EINA_SLICE_STR(*data);
68 efl_gfx_buffer_managed_set(o_images[i], &slice, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, 0);
66 free(yp); 69 free(yp);
67 free(up); 70 free(up);
68 free(vp); 71 free(vp);
diff --git a/src/bin/image_data_ycbcr601pl_wide_stride.c b/src/bin/image_data_ycbcr601pl_wide_stride.c
index b7a4396..c9eeb14 100644
--- a/src/bin/image_data_ycbcr601pl_wide_stride.c
+++ b/src/bin/image_data_ycbcr601pl_wide_stride.c
@@ -25,6 +25,8 @@ static void _setup(void)
25 FILE *f; 25 FILE *f;
26 unsigned char **data, **lp; 26 unsigned char **data, **lp;
27 Evas_Object *o; 27 Evas_Object *o;
28 Eina_Slice slice;
29
28 for (i = 0; i < 1; i++) 30 for (i = 0; i < 1; i++)
29 { 31 {
30 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas); 32 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
@@ -62,7 +64,8 @@ static void _setup(void)
62 *lp = vp + (y * 320); 64 *lp = vp + (y * 320);
63 lp++; 65 lp++;
64 } 66 }
65 efl_gfx_buffer_data_set(o_images[i], data, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL); 67 slice = (Eina_Slice)EINA_SLICE_STR(*data);
68 efl_gfx_buffer_managed_set(o_images[i], &slice, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, 0);
66 efl_gfx_buffer_update_add(o_images[i], 0, 0, 320, 480); 69 efl_gfx_buffer_update_add(o_images[i], 0, 0, 320, 480);
67 free(yp); 70 free(yp);
68 free(up); 71 free(up);
@@ -122,7 +125,7 @@ static void _loop(double t, int f)
122 lp++; 125 lp++;
123 } 126 }
124 127
125 efl_gfx_buffer_copy_set(o_images[i], data, w, 480, w * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL); 128 efl_gfx_buffer_copy_set(o_images[i], data, w, 480, w * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL, 0);
126 efl_gfx_buffer_update_add(o_images[i], 0, 0, w, 480); 129 efl_gfx_buffer_update_add(o_images[i], 0, 0, w, 480);
127 free(data); 130 free(data);
128 } 131 }