aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-02-20 17:21:30 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2013-02-20 17:21:30 +0000
commit5e99f9b96873a794f40d30bbb997917cf57a5bdf (patch)
treef4a9beae8085c4b4319e73449c82ddb6dacd3fc3 /src
parent251eac7d7a5c6d7f2e4fccac3c2240197b7c5aac (diff)
downloadefl-5e99f9b96873a794f40d30bbb997917cf57a5bdf.tar.gz
efl-5e99f9b96873a794f40d30bbb997917cf57a5bdf.tar.xz
efl-5e99f9b96873a794f40d30bbb997917cf57a5bdf.zip
Revert "Refactor evas_sw_xlib_outbuf to allocate less in case of rotations."
This reverts commit 139737247d563f53a064c7f4a025a89ed64c2983. THis fix was completely wrong. Conflicts: ChangeLog
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_outbuf.c76
1 files changed, 12 insertions, 64 deletions
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
index 132bfb053..d495931e5 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_outbuf.c
@@ -364,7 +364,7 @@ evas_software_xlib_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
RGBA_Image *
evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
{
- RGBA_Image *im = NULL;
+ RGBA_Image *im;
Outbuf_Region *obr;
int bpl = 0;
int use_shm = 1;
@@ -459,11 +459,6 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
}
else
{
- /* FIXME: For the onebuf case we probably need to do the same thing we did below
- * (try to get an existing image before we allocate a new one). This code path
- * is not really used at the moment so no way to test (and that's why the change
- * is not implemented here as well.
- */
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
im = (RGBA_Image *)evas_cache2_image_empty(evas_common_image_cache2_get());
@@ -617,73 +612,26 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
}
else
{
- obr->xob = _find_xob(buf->priv.x11.xlib.disp,
- buf->priv.x11.xlib.vis,
- buf->priv.x11.xlib.depth,
- w, h,
- use_shm,
- NULL);
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
- {
- if (obr->xob)
- im = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
- w, h,
- (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl),
- alpha, EVAS_COLORSPACE_ARGB8888);
-
- if (!im)
- {
- if (obr->xob) _unfind_xob(obr->xob, 0);
- im = (RGBA_Image *)evas_cache2_image_empty(evas_common_image_cache2_get());
- if (!im)
- {
- free(obr);
- return NULL;
- }
- else
- {
- im->cache_entry.w = w;
- im->cache_entry.h = h;
- im->cache_entry.flags.alpha |= alpha ? 1 : 0;
- evas_cache2_image_surface_alloc(&im->cache_entry, w, h);
- }
- }
- }
+ im = (RGBA_Image *)evas_cache2_image_empty(evas_common_image_cache2_get());
else
#endif
+ im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+ if (!im)
{
- if (obr->xob)
- im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
- w, h,
- (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl),
- alpha, EVAS_COLORSPACE_ARGB8888);
-
- if (!im)
- {
- if (obr->xob) _unfind_xob(obr->xob, 0);
- im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
- if (!im)
- {
- free(obr);
- return NULL;
- }
- else
- {
- im->cache_entry.w = w;
- im->cache_entry.h = h;
- im->cache_entry.flags.alpha |= alpha ? 1 : 0;
- evas_cache_image_surface_alloc(&im->cache_entry, w, h);
- }
- }
+ free(obr);
+ return NULL;
}
-
- /* Need to update cache_entry w/h here because the render path expects them to be updated
- * to the new geometry. */
im->cache_entry.w = w;
im->cache_entry.h = h;
im->cache_entry.flags.alpha |= alpha ? 1 : 0;
-
+#ifdef EVAS_CSERVE2
+ if (evas_cserve2_use_get())
+ evas_cache2_image_surface_alloc(&im->cache_entry, w, h);
+ else
+#endif
+ evas_cache_image_surface_alloc(&im->cache_entry, w, h);
im->extended_info = obr;
if ((buf->rot == 0) || (buf->rot == 180))
{