summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-04-29 11:29:33 +0100
committerChris Michael <cp.michael@samsung.com>2013-04-29 11:32:18 +0100
commit672a2e36e3180f31a4f9e0e4c8d0061619244a7f (patch)
treedb94daa5d6a8e44f0680f8d2d815f5d5c71638cb /src
parent66d258d17bb955519fac5b89b0f4f89dbd30b4a7 (diff)
Use the width & height from the buffer (actual image size) when
calling evas cache image data. When we push an updated region, be sure to account for the rectangle position during the conversion function. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_swapbuf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
index 7542cfb..e48f39b 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
@@ -151,20 +151,21 @@ evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx,
151 { 151 {
152 if (!(img = ob->priv.onebuf)) 152 if (!(img = ob->priv.onebuf))
153 { 153 {
154 int bw = 0, bh = 0;
154 void *data; 155 void *data;
155 156
156 data = evas_swapper_buffer_map(ob->priv.swapper, NULL, NULL); 157 data = evas_swapper_buffer_map(ob->priv.swapper, &bw, &bh);
157 158
158#ifdef EVAS_CSERVE2 159#ifdef EVAS_CSERVE2
159 if (evas_cserve2_use_get()) 160 if (evas_cserve2_use_get())
160 img = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(), 161 img = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
161 ob->w, ob->h, data, 162 bw, bh, data,
162 ob->priv.destination_alpha, 163 ob->priv.destination_alpha,
163 EVAS_COLORSPACE_ARGB8888); 164 EVAS_COLORSPACE_ARGB8888);
164 else 165 else
165#endif 166#endif
166 img = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), 167 img = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
167 ob->w, ob->h, data, 168 bw, bh, data,
168 ob->priv.destination_alpha, 169 ob->priv.destination_alpha,
169 EVAS_COLORSPACE_ARGB8888); 170 EVAS_COLORSPACE_ARGB8888);
170 171
@@ -312,7 +313,6 @@ evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, in
312 /* check for valid update image data */ 313 /* check for valid update image data */
313 if (!(src = update->image.data)) return; 314 if (!(src = update->image.data)) return;
314 315
315
316 bpp = depth / 8; 316 bpp = depth / 8;
317 if (bpp <= 0) return; 317 if (bpp <= 0) return;
318 318
@@ -360,7 +360,7 @@ evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, in
360 dst += (bpl * rect.y) + (rect.x * bpp); 360 dst += (bpl * rect.y) + (rect.x * bpp);
361 361
362 func(src, dst, (update->cache_entry.w - w), (wid - rect.w), 362 func(src, dst, (update->cache_entry.w - w), (wid - rect.w),
363 rect.w, rect.h, x, y, NULL); 363 rect.w, rect.h, x + rx, y + ry, NULL);
364} 364}
365 365
366void 366void