expedite-cxx: Fixed more tests.
No tests are crashing anymore.
This commit is contained in:
parent
428f271bcf
commit
c9984a38ad
|
@ -38,11 +38,10 @@ static void _setup(void)
|
|||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
efl_file_set(build_path("image.png"), "");
|
||||
evas_obj_position_set(x, y);
|
||||
o.file_set(build_path("image.png"), "");
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
|
|
|
@ -28,7 +28,7 @@ static void _setup(void)
|
|||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
efl_file_set(build_path("logo.png"), "");
|
||||
o.file_set(build_path("logo.png"), "");
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
|
|
|
@ -31,7 +31,7 @@ static void _setup(void)
|
|||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_ARGB8888);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.size_set(640, 480);
|
||||
o.alpha_set(1);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
|
@ -61,9 +61,8 @@ static void _loop(double t, int f)
|
|||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
unsigned int *data = static_cast<unsigned int*>(img.data_get(1));
|
||||
int st = evas_obj_image_stride_get();
|
||||
st = st >> 2;
|
||||
unsigned int *data = reinterpret_cast<unsigned int*>(img.data_get(1));
|
||||
int st = img.stride_get() >> 2;
|
||||
unsigned int *p = data;
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
|
|
|
@ -33,22 +33,22 @@ static void _setup(void)
|
|||
char buf[256];
|
||||
|
||||
evas::image o1(efl::eo::parent = canvas);
|
||||
images.push_back(o1);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); // XXX
|
||||
o1.file_set(build_path(buf), "");
|
||||
o1.fill_set(0, 0, 256, 256);
|
||||
o1.evas::object::size_set(256, 256);
|
||||
o1.smooth_scale_set(0);
|
||||
o1.visibility_set(true);
|
||||
images.push_back(o1);
|
||||
|
||||
evas::image o2(efl::eo::parent = canvas);
|
||||
reflec.push_back(o1);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); // XXX
|
||||
o2.file_set(build_path(buf), "");
|
||||
o2.fill_set(0, 0, 256, 256);
|
||||
o2.size_set(256, 256);
|
||||
o2.smooth_scale_set(0);
|
||||
o2.visibility_set(true);
|
||||
reflec.push_back(o2);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
@ -73,13 +73,12 @@ static void _loop(double t, int f)
|
|||
if (!m) m = evas_map_new(4);
|
||||
evas_map_smooth_set(m, 0);
|
||||
|
||||
auto it_i = images.begin();
|
||||
auto it_r = reflec.begin();
|
||||
for (int i = 0; i < CNUM; i++)
|
||||
{
|
||||
++it_i;
|
||||
++it_r;
|
||||
efl::eina::list<evas::object>::iterator
|
||||
it_i = images.begin(), end_i = images.end(),
|
||||
it_r = reflec.begin(), end_r = reflec.end();
|
||||
|
||||
for (int i = 0; i < CNUM && it_i != end_i && it_r != end_r; i++)
|
||||
{
|
||||
Evas_Coord x = (win_w / 2);
|
||||
Evas_Coord y = (win_h / 2);
|
||||
Evas_Coord w = 256;
|
||||
|
@ -186,8 +185,10 @@ static void _loop(double t, int f)
|
|||
|
||||
(*it_r).map_enable_set(1);
|
||||
(*it_r).map_set(m);
|
||||
}
|
||||
|
||||
++it_i;
|
||||
++it_r;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ static void _setup(void)
|
|||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::rectangle& rec : rectangles)
|
||||
rec.parent_set(efl::eo::base(nullptr));
|
||||
rectangles.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -26,10 +26,9 @@ static efl::eina::list<evas::rectangle> rectangles;
|
|||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
int i;
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::rectangle o(efl::eo::parent = canvas);
|
||||
rectangles.push_back(o);
|
||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
|||
int r = ((rnd()&0xff) * a) / 255;
|
||||
int g = ((rnd()&0xff) * a) / 255;
|
||||
int b = ((rnd()&0xff) * a) / 255;
|
||||
o.color_set(r, g, b, a);
|
||||
o.evas::object::color_set(r, g, b, a);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
|
@ -46,6 +45,8 @@ static void _setup(void)
|
|||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::rectangle& rec : rectangles)
|
||||
rec.parent_set(efl::eo::base(nullptr));
|
||||
rectangles.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ static void _setup(void)
|
|||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::rectangle& rec : rectangles)
|
||||
rec.parent_set(efl::eo::base(nullptr));
|
||||
rectangles.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ static const char *icons[] =
|
|||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
#if 0
|
||||
#if 0
|
||||
int i;
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (i = 0; i < NUM; i++)
|
||||
|
@ -66,7 +66,7 @@ static void _setup(void)
|
|||
evas_obj_visibility_set(EINA_TRUE));
|
||||
}
|
||||
done = 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
|
|
Loading…
Reference in New Issue