forked from enlightenment/efl
small improvement to pixman support - no need to create color image in
context unless font or rect or line or poly used.
This commit is contained in:
parent
3d3cdf0944
commit
b121520955
|
@ -77,11 +77,13 @@ evas_common_draw_context_free(RGBA_Draw_Context *dc)
|
||||||
if (!dc) return;
|
if (!dc) return;
|
||||||
|
|
||||||
#ifdef HAVE_PIXMAN
|
#ifdef HAVE_PIXMAN
|
||||||
|
#if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY)
|
||||||
if (dc->col.pixman_color_image)
|
if (dc->col.pixman_color_image)
|
||||||
{
|
{
|
||||||
pixman_image_unref(dc->col.pixman_color_image);
|
pixman_image_unref(dc->col.pixman_color_image);
|
||||||
dc->col.pixman_color_image = NULL;
|
dc->col.pixman_color_image = NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
|
evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
|
||||||
|
@ -143,6 +145,7 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i
|
||||||
B_VAL(&(dc->col.col)) = (DATA8)b;
|
B_VAL(&(dc->col.col)) = (DATA8)b;
|
||||||
A_VAL(&(dc->col.col)) = (DATA8)a;
|
A_VAL(&(dc->col.col)) = (DATA8)a;
|
||||||
#ifdef HAVE_PIXMAN
|
#ifdef HAVE_PIXMAN
|
||||||
|
#if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY)
|
||||||
if (dc && dc->col.pixman_color_image)
|
if (dc && dc->col.pixman_color_image)
|
||||||
pixman_image_unref(dc->col.pixman_color_image);
|
pixman_image_unref(dc->col.pixman_color_image);
|
||||||
|
|
||||||
|
@ -154,6 +157,7 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i
|
||||||
pixman_color.blue = (dc->col.col & 0x000000ff) << 8;
|
pixman_color.blue = (dc->col.col & 0x000000ff) << 8;
|
||||||
|
|
||||||
dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color);
|
dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue