forked from enlightenment/efl
evas filters: Remove warning about OpenGL
Well... I'm working on making all this work, so the log is a bit irrelevant now.
This commit is contained in:
parent
b77cb960ca
commit
9aa335cecc
|
@ -525,19 +525,13 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
||||||
efl_ui_text_scrollable_set(efl_added, 1));
|
efl_ui_text_scrollable_set(efl_added, 1));
|
||||||
efl_event_callback_add(o, EFL_UI_TEXT_EVENT_CHANGED_USER, _code_changed, win);
|
efl_event_callback_add(o, EFL_UI_TEXT_EVENT_CHANGED_USER, _code_changed, win);
|
||||||
|
|
||||||
// HACK: For now only set filter on code if engine is not GL (WIP)
|
// Insert filter code inside style string: DEFAULT='blah blah <here>'
|
||||||
const char *engine = ecore_evas_engine_name_get
|
buf = eina_strbuf_new();
|
||||||
(ecore_evas_ecore_evas_get(evas_object_evas_get(win)));
|
eina_strbuf_append(buf, efl_canvas_text_style_get(o, NULL));
|
||||||
if (engine && !strstr(engine, "gl"))
|
eina_strbuf_insert(buf, " gfx_filter=code", eina_strbuf_length_get(buf) - 1);
|
||||||
{
|
efl_gfx_filter_program_set(o, code_filter, "code");
|
||||||
// Insert filter code inside style string: DEFAULT='blah blah <here>'
|
efl_canvas_text_style_set(o, NULL, eina_strbuf_string_get(buf));
|
||||||
buf = eina_strbuf_new();
|
eina_strbuf_free(buf);
|
||||||
eina_strbuf_append(buf, efl_canvas_text_style_get(o, NULL));
|
|
||||||
eina_strbuf_insert(buf, " gfx_filter=code", eina_strbuf_length_get(buf) - 1);
|
|
||||||
efl_gfx_filter_program_set(o, code_filter, "code");
|
|
||||||
efl_canvas_text_style_set(o, NULL, eina_strbuf_string_get(buf));
|
|
||||||
eina_strbuf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
|
// FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
|
||||||
// Efl.Ui.Text doesn't seem to trigger the proper events during edit
|
// Efl.Ui.Text doesn't seem to trigger the proper events during edit
|
||||||
|
|
|
@ -41,7 +41,6 @@ Evas_Filter_Context *
|
||||||
evas_filter_context_new(Evas_Public_Data *evas, Eina_Bool async, void *user_data)
|
evas_filter_context_new(Evas_Public_Data *evas, Eina_Bool async, void *user_data)
|
||||||
{
|
{
|
||||||
Evas_Filter_Context *ctx;
|
Evas_Filter_Context *ctx;
|
||||||
static int warned = 0;
|
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(evas->engine.func->gfx_filter_supports, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(evas->engine.func->gfx_filter_supports, NULL);
|
||||||
|
@ -54,16 +53,7 @@ evas_filter_context_new(Evas_Public_Data *evas, Eina_Bool async, void *user_data
|
||||||
ctx->async = async;
|
ctx->async = async;
|
||||||
ctx->user_data = user_data;
|
ctx->user_data = user_data;
|
||||||
ctx->buffer_scaled_get = &evas_filter_buffer_scaled_get;
|
ctx->buffer_scaled_get = &evas_filter_buffer_scaled_get;
|
||||||
|
ctx->gl = (ENFN->gl_surface_read_pixels != NULL);
|
||||||
if (ENFN->gl_surface_read_pixels)
|
|
||||||
{
|
|
||||||
ctx->gl = EINA_TRUE;
|
|
||||||
if (!warned)
|
|
||||||
{
|
|
||||||
WRN("OpenGL support through SW functions, expect low performance!");
|
|
||||||
warned = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue