forked from enlightenment/efl
Evas filters: Disable styles when filter_chain is set
Since the default theme includes a dark shadow behind normal lines text (white on dark grey), we need to skip those when using a filter program.
This commit is contained in:
parent
109894bb56
commit
9da4789b66
|
@ -384,7 +384,6 @@ struct _Evas_Object_Textblock_Item
|
|||
size_t visual_pos;
|
||||
#endif
|
||||
Evas_Textblock_Item_Type type;
|
||||
|
||||
Evas_Coord adv, x, w, h;
|
||||
Evas_Coord yoff;
|
||||
Eina_Bool merge : 1; /* Indicates whether this
|
||||
|
@ -6312,7 +6311,6 @@ static void
|
|||
_markup_get_text_append(Eina_Strbuf *txt, const Eina_Unicode *text)
|
||||
{
|
||||
char *base = eina_unicode_unicode_to_utf8(text, NULL);
|
||||
|
||||
if (!base) return;
|
||||
|
||||
_markup_get_text_utf8_append(txt, base);
|
||||
|
@ -10710,7 +10708,6 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
|
||||
ENFN->context_color_set(output, context, 0, 0, 0, 0);
|
||||
ca = cr = cg = cb = 0;
|
||||
|
||||
#define ITEM_WALK() \
|
||||
EINA_INLIST_FOREACH(start, par) \
|
||||
{ \
|
||||
|
@ -10910,6 +10907,7 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
|
||||
/* Draw background */
|
||||
DRAW_FORMAT(backing, 0, ln->h);
|
||||
|
||||
}
|
||||
ITEM_WALK_END();
|
||||
|
||||
|
@ -10924,7 +10922,6 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
int shad_dst, shad_sz, dx, dy, haveshad;
|
||||
Evas_Object_Textblock_Text_Item *ti;
|
||||
Evas_Coord yoff;
|
||||
|
||||
ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
|
||||
if (!ti) continue;
|
||||
|
||||
|
@ -11034,7 +11031,6 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
{
|
||||
Evas_Object_Textblock_Text_Item *ti;
|
||||
Evas_Coord yoff;
|
||||
|
||||
ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
|
||||
if (!ti) continue;
|
||||
|
||||
|
@ -11067,7 +11063,6 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
{
|
||||
Evas_Object_Textblock_Text_Item *ti;
|
||||
Evas_Coord yoff;
|
||||
|
||||
ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
|
||||
if (!ti) continue;
|
||||
|
||||
|
|
|
@ -561,7 +561,7 @@ evas_filter_command_fill_add(Evas_Filter_Context *ctx, void *draw_context,
|
|||
return -1;
|
||||
}
|
||||
|
||||
cmd = _command_new(ctx, EVAS_FILTER_MODE_FILL, buf, NULL, NULL);
|
||||
cmd = _command_new(ctx, EVAS_FILTER_MODE_FILL, buf, NULL, buf);
|
||||
if (!cmd) return -1;
|
||||
|
||||
ENFN->context_color_get(ENDT, draw_context, &R, &G, &B, &A);
|
||||
|
@ -1045,7 +1045,7 @@ end:
|
|||
static Eina_Bool
|
||||
_fill_cpu(Evas_Filter_Command *cmd)
|
||||
{
|
||||
Evas_Filter_Buffer *fb = cmd->input;
|
||||
Evas_Filter_Buffer *fb = cmd->output;
|
||||
int step = fb->alpha_only ? sizeof(DATA8) : sizeof(DATA32);
|
||||
int x = MAX(0, cmd->draw.clipx);
|
||||
int y = MAX(0, cmd->draw.clipy);
|
||||
|
@ -1092,7 +1092,7 @@ Evas_Filter_Apply_Func
|
|||
evas_filter_fill_cpu_func_get(Evas_Filter_Command *cmd)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cmd, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->input, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL);
|
||||
return _fill_cpu;
|
||||
}
|
||||
|
||||
|
@ -1158,6 +1158,7 @@ _filter_name_get(int mode)
|
|||
FNAME(DISPLACE);
|
||||
FNAME(MASK);
|
||||
FNAME(BUMP);
|
||||
FNAME(FILL);
|
||||
default: return "INVALID";
|
||||
}
|
||||
#undef FNAME
|
||||
|
|
Loading…
Reference in New Issue