diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/evas/src/modules/engines/buffer/evas_outbuf.c | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/modules/engines/buffer/evas_outbuf.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/libraries/evas/src/modules/engines/buffer/evas_outbuf.c b/libraries/evas/src/modules/engines/buffer/evas_outbuf.c index 27f7a2c..0fa1842 100644 --- a/libraries/evas/src/modules/engines/buffer/evas_outbuf.c +++ b/libraries/evas/src/modules/engines/buffer/evas_outbuf.c | |||
@@ -19,11 +19,12 @@ evas_buffer_outbuf_buf_free(Outbuf *buf) | |||
19 | Outbuf * | 19 | Outbuf * |
20 | evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level, | 20 | evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level, |
21 | void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes), | 21 | void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes), |
22 | void (*free_update_region) (int x, int y, int w, int h, void *data) | 22 | void (*free_update_region) (int x, int y, int w, int h, void *data), |
23 | void * (*switch_buffer) (void *data, void *dest_buffer), | ||
24 | void *switch_data | ||
23 | ) | 25 | ) |
24 | { | 26 | { |
25 | Outbuf *buf; | 27 | Outbuf *buf; |
26 | int bpp; | ||
27 | 28 | ||
28 | buf = calloc(1, sizeof(Outbuf)); | 29 | buf = calloc(1, sizeof(Outbuf)); |
29 | if (!buf) return NULL; | 30 | if (!buf) return NULL; |
@@ -38,14 +39,12 @@ evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, in | |||
38 | buf->alpha_level = alpha_level; | 39 | buf->alpha_level = alpha_level; |
39 | buf->color_key = color_key; | 40 | buf->color_key = color_key; |
40 | buf->use_color_key = use_color_key; | 41 | buf->use_color_key = use_color_key; |
42 | buf->first_frame = 1; | ||
41 | 43 | ||
42 | buf->func.new_update_region = new_update_region; | 44 | buf->func.new_update_region = new_update_region; |
43 | buf->func.free_update_region = free_update_region; | 45 | buf->func.free_update_region = free_update_region; |
44 | 46 | buf->func.switch_buffer = switch_buffer; | |
45 | bpp = sizeof(DATA32); | 47 | buf->switch_data = switch_data; |
46 | if ((buf->depth == OUTBUF_DEPTH_RGB_24BPP_888_888) || | ||
47 | (buf->depth == OUTBUF_DEPTH_BGR_24BPP_888_888)) | ||
48 | bpp = 3; | ||
49 | 48 | ||
50 | if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888) && | 49 | if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888) && |
51 | (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32)))) | 50 | (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32)))) |
@@ -102,6 +101,24 @@ evas_buffer_outbuf_buf_free_region_for_update(Outbuf *buf, RGBA_Image *update) | |||
102 | } | 101 | } |
103 | 102 | ||
104 | void | 103 | void |
104 | evas_buffer_outbuf_buf_switch_buffer(Outbuf *buf) | ||
105 | { | ||
106 | if (buf->func.switch_buffer) | ||
107 | { | ||
108 | buf->dest = buf->func.switch_buffer(buf->switch_data, buf->dest); | ||
109 | if (buf->priv.back_buf) | ||
110 | { | ||
111 | evas_cache_image_drop(&buf->priv.back_buf->cache_entry); | ||
112 | buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), | ||
113 | buf->w, buf->h, | ||
114 | buf->dest, | ||
115 | buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888 ? 1 : 0, | ||
116 | EVAS_COLORSPACE_ARGB8888); | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | void | ||
105 | evas_buffer_outbuf_buf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) | 122 | evas_buffer_outbuf_buf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) |
106 | { | 123 | { |
107 | /* copy update image to out buf & convert */ | 124 | /* copy update image to out buf & convert */ |