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
This commit is contained in:
Subhransu Mohanty 2016-10-10 14:09:23 +09:00 committed by Hermet Park
parent 46e58922fe
commit 525879533a
6 changed files with 35 additions and 20 deletions

View File

@ -23,6 +23,7 @@ static void _setup(void)
int i;
Evas_Object *o;
void *pixels;
Eina_Slice slice;
pixels = malloc(sizeof (int) * 640 * 480);
for (i = 0; i < 1; i++)
@ -34,7 +35,8 @@ static void _setup(void)
efl_gfx_fill_set(o, 0, 0, 640, 480);
efl_gfx_size_set(o, 640, 480);
efl_gfx_visible_set(o, EINA_TRUE);
efl_gfx_buffer_copy_set(o_images[i], pixels, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888);
slice = (Eina_Slice)EINA_SLICE_STR(pixels);
efl_gfx_buffer_copy_set(o_images[i], &slice, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888, 0);
}
free(pixels);
done = 0;
@ -52,9 +54,11 @@ static void _loop(double t, int f)
{
int i, st;
Evas_Coord x, y, w, h;
Eina_Rw_Slice rw_slice;
for (i = 0; i < 1; i++)
{
unsigned int *data, *p;
unsigned int result, *p;
int length;
w = 640;
@ -64,17 +68,17 @@ static void _loop(double t, int f)
efl_gfx_position_set(o_images[i], x, y);
efl_gfx_size_set(o_images[i], w, h);
efl_gfx_fill_set(o_images[i], 0, 0, w, h);
data = efl_gfx_buffer_map(o_images[i], &length,
result = efl_gfx_buffer_map(o_images[i], &rw_slice,
EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888,
0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888, 0,
&st);
if (!data)
if (!result)
{
fprintf(stderr, "ERROR: Failed to map image!\n");
continue;
}
st = st >> 2;
p = data;
p = rw_slice.mem;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
@ -84,7 +88,7 @@ static void _loop(double t, int f)
}
p += (st - w);
}
efl_gfx_buffer_unmap(o_images[i], data, length);
efl_gfx_buffer_unmap(o_images[i], &rw_slice);
efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h);
}
FPS_STD(NAME);

View File

@ -34,7 +34,7 @@ static void _setup(void)
efl_gfx_fill_set(o, 0, 0, 640, 480);
efl_gfx_size_set(o, 640, 480);
efl_gfx_visible_set(o, EINA_TRUE);
efl_gfx_buffer_copy_set(o_images[i], pixels, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888);
efl_gfx_buffer_copy_set(o_images[i], pixels, 640, 480, 640 * sizeof (int), EFL_GFX_COLORSPACE_ARGB8888, 0);
}
free(pixels);
done = 0;
@ -52,10 +52,12 @@ static void _loop(double t, int f)
{
int i, st;
Evas_Coord x, y, w, h;
Eina_Rw_Slice rw_slice;
for (i = 0; i < 1; i++)
{
unsigned int *data, *p;
int a, r, g, b, length;
unsigned int result, *p;
int a, r, g, b;
w = 640;
h = 480;
@ -64,17 +66,17 @@ static void _loop(double t, int f)
efl_gfx_position_set(o_images[i], x, y);
efl_gfx_size_set(o_images[i], w, h);
efl_gfx_fill_set(o_images[i], 0, 0, w, h);
data = efl_gfx_buffer_map(o_images[i], &length,
result = efl_gfx_buffer_map(o_images[i], &rw_slice,
EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888,
0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB8888, 0,
&st);
if (!data)
if (!result)
{
fprintf(stderr, "ERROR: Failed to map image!\n");
continue;
}
st = st >> 2;
p = data;
p = rw_slice.mem;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
@ -95,7 +97,7 @@ static void _loop(double t, int f)
}
p += (st - w);
}
efl_gfx_buffer_unmap(o_images[i], data, length);
efl_gfx_buffer_unmap(o_images[i], &rw_slice);
efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h);
}
FPS_STD(NAME);

View File

@ -63,7 +63,7 @@ static void _setup(void)
*lp = vp + (y * 320);
lp++;
}
efl_gfx_buffer_copy_set(o_images[i], data, 640, 480, 640 * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL);
efl_gfx_buffer_copy_set(o_images[i], data, 640, 480, 640 * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL, 0);
free(data);
// Not a real copy in fact...
/* free(yp); */

View File

@ -25,6 +25,8 @@ static void _setup(void)
FILE *f;
unsigned char **data, **lp;
Evas_Object *o;
Eina_Slice slice;
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
@ -63,7 +65,8 @@ static void _setup(void)
*lp = vp + (y * 320);
lp++;
}
efl_gfx_buffer_data_set(o_images[i], data, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL);
slice = (Eina_Slice)EINA_SLICE_STR(*data);
efl_gfx_buffer_managed_set(o_images[i], &slice, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, 0);
free(yp);
free(up);
free(vp);

View File

@ -25,6 +25,8 @@ static void _setup(void)
FILE *f;
unsigned char **data, **lp;
Evas_Object *o;
Eina_Slice slice;
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
@ -62,7 +64,8 @@ static void _setup(void)
*lp = vp + (y * 320);
lp++;
}
efl_gfx_buffer_data_set(o_images[i], data, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL);
slice = (Eina_Slice)EINA_SLICE_STR(*data);
efl_gfx_buffer_managed_set(o_images[i], &slice, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, 0);
free(yp);
free(up);
free(vp);

View File

@ -25,6 +25,8 @@ static void _setup(void)
FILE *f;
unsigned char **data, **lp;
Evas_Object *o;
Eina_Slice slice;
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
@ -62,7 +64,8 @@ static void _setup(void)
*lp = vp + (y * 320);
lp++;
}
efl_gfx_buffer_data_set(o_images[i], data, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL);
slice = (Eina_Slice)EINA_SLICE_STR(*data);
efl_gfx_buffer_managed_set(o_images[i], &slice, 640, 480, 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, 0);
efl_gfx_buffer_update_add(o_images[i], 0, 0, 320, 480);
free(yp);
free(up);
@ -122,7 +125,7 @@ static void _loop(double t, int f)
lp++;
}
efl_gfx_buffer_copy_set(o_images[i], data, w, 480, w * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL);
efl_gfx_buffer_copy_set(o_images[i], data, w, 480, w * sizeof (int), EVAS_COLORSPACE_YCBCR422P601_PL, 0);
efl_gfx_buffer_update_add(o_images[i], 0, 0, w, 480);
free(data);
}