If we have an existing outbuf, then free the old one and try to create

a new one.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-04-30 07:20:52 +01:00
parent e701a13e86
commit 6a369b2a2a
1 changed files with 11 additions and 2 deletions

View File

@ -139,14 +139,23 @@ eng_setup(Evas *evas, void *einfo)
info->info.rotation, info->info.depth,
info->info.destination_alpha, swap)))
return 0;
re->info = info;
}
else
{
/* if we have an existing outbuf, free it */
if (re->ob) evas_outbuf_free(re->ob);
/* try to create a new outbuf */
if (!(re->ob =
evas_outbuf_setup(epd->output.w, epd->output.h,
info->info.rotation, info->info.depth,
info->info.destination_alpha)))
return 0;
}
/* update the info structure pointer */
re->info = info;
/* reassign engine output */
epd->engine.data.output = re;
if (!epd->engine.data.output) return 0;