diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2013-03-12 11:56:40 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2013-03-12 15:30:03 +0900 |
commit | b121520955d42cb0da8e96e3c81e06cce1d1f90c (patch) | |
tree | 4415f6a81bfb122a7c020e5984f6c963741c5f84 /src/lib/evas/common/evas_draw_main.c | |
parent | 3d3cdf09443528c891528facb78bd8ee2c4805f1 (diff) |
small improvement to pixman support - no need to create color image in
context unless font or rect or line or poly used.
Diffstat (limited to 'src/lib/evas/common/evas_draw_main.c')
-rw-r--r-- | src/lib/evas/common/evas_draw_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_draw_main.c b/src/lib/evas/common/evas_draw_main.c index bfed3e4..bf0f96b 100644 --- a/src/lib/evas/common/evas_draw_main.c +++ b/src/lib/evas/common/evas_draw_main.c | |||
@@ -77,12 +77,14 @@ evas_common_draw_context_free(RGBA_Draw_Context *dc) | |||
77 | if (!dc) return; | 77 | if (!dc) return; |
78 | 78 | ||
79 | #ifdef HAVE_PIXMAN | 79 | #ifdef HAVE_PIXMAN |
80 | #if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY) | ||
80 | if (dc->col.pixman_color_image) | 81 | if (dc->col.pixman_color_image) |
81 | { | 82 | { |
82 | pixman_image_unref(dc->col.pixman_color_image); | 83 | pixman_image_unref(dc->col.pixman_color_image); |
83 | dc->col.pixman_color_image = NULL; | 84 | dc->col.pixman_color_image = NULL; |
84 | } | 85 | } |
85 | #endif | 86 | #endif |
87 | #endif | ||
86 | 88 | ||
87 | evas_common_draw_context_apply_clean_cutouts(&dc->cutout); | 89 | evas_common_draw_context_apply_clean_cutouts(&dc->cutout); |
88 | free(dc); | 90 | free(dc); |
@@ -143,6 +145,7 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i | |||
143 | B_VAL(&(dc->col.col)) = (DATA8)b; | 145 | B_VAL(&(dc->col.col)) = (DATA8)b; |
144 | A_VAL(&(dc->col.col)) = (DATA8)a; | 146 | A_VAL(&(dc->col.col)) = (DATA8)a; |
145 | #ifdef HAVE_PIXMAN | 147 | #ifdef HAVE_PIXMAN |
148 | #if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY) | ||
146 | if (dc && dc->col.pixman_color_image) | 149 | if (dc && dc->col.pixman_color_image) |
147 | pixman_image_unref(dc->col.pixman_color_image); | 150 | pixman_image_unref(dc->col.pixman_color_image); |
148 | 151 | ||
@@ -154,6 +157,7 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i | |||
154 | pixman_color.blue = (dc->col.col & 0x000000ff) << 8; | 157 | pixman_color.blue = (dc->col.col & 0x000000ff) << 8; |
155 | 158 | ||
156 | dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color); | 159 | dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color); |
160 | #endif | ||
157 | #endif | 161 | #endif |
158 | 162 | ||
159 | } | 163 | } |