expedite-cxx: Fix deadlock.

devs/felipealmeida/expedite-cxx
Savio Sena 8 years ago
parent d7cfdd0557
commit 78fc05ac91
  1. 21
      src/bin/cxx/font_effect_blur_color.cc

@ -19,7 +19,7 @@
static int done = 0;
extern int win_w, win_h;
/* private data */
static evas::text text;
static evas::text *text;
static const int MAX_BLUR = 100;
/* setup */
@ -28,13 +28,13 @@ static void _setup(void)
evas::canvas canvas(::eo_ref(G_evas));
int w, h;
evas::text o(efl::eo::parent = canvas);
o.evas::object::color_set(0, 0, 0, 255);
o.font_set("Vera-Bold", 80);
o.text_set("Font Effect");
o.visibility_set(true);
o.evas::object::size_get(&w, &h);
o.evas::object::position_set((win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR);
evas::text *o = new evas::text(efl::eo::parent = canvas);
o->evas::object::color_set(0, 0, 0, 255);
o->font_set("Vera-Bold", 80);
o->text_set("Font Effect");
o->visibility_set(true);
o->evas::object::size_get(&w, &h);
o->evas::object::position_set((win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR);
text = o;
done = 0;
}
@ -42,7 +42,8 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
::eo_del(text._release());
text->visibility_set(false);
delete text;
}
/* loop - do things */
@ -53,7 +54,7 @@ static void _loop(double t, int f)
char buf[256];
const char *str = "buffer:a(rgba);padding_set(%d);blend(dst=a,color=darkblue);blur(%d,src=a);";
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
text.filter_program_set(buf);
text->filter_program_set(buf);
}
FPS_STD(NAME);
}

Loading…
Cancel
Save