forked from enlightenment/efl
buffer: reorder destroy-recreate sequence to avoid cache to be destroyed.
users of buffer engine (ie: e_thumb_main.c) were broken since when they resize the canvas they would implicitly call engine->setup() again, which would destroy output and create it again. However the cache could be destroyed and images using it would be bogus. This does not happen if the process have other cache users, but e_thumb is just one canvas live at time. By reordering, we have the cache reference to go to 2 and then back to 1, not destroying it. SVN revision: 38739
This commit is contained in:
parent
da4cbd5c95
commit
b814a5e2be
|
@ -135,8 +135,6 @@ eng_setup(Evas *e, void *in)
|
|||
Evas_Engine_Info_Buffer *info;
|
||||
|
||||
info = (Evas_Engine_Info_Buffer *)in;
|
||||
if (e->engine.data.output)
|
||||
eng_output_free(e->engine.data.output);
|
||||
re = _output_setup(e->output.w,
|
||||
e->output.h,
|
||||
info->info.dest_buffer,
|
||||
|
@ -149,6 +147,8 @@ eng_setup(Evas *e, void *in)
|
|||
info->info.color_key_b,
|
||||
info->info.func.new_update_region,
|
||||
info->info.func.free_update_region);
|
||||
if (e->engine.data.output)
|
||||
eng_output_free(e->engine.data.output);
|
||||
e->engine.data.output = re;
|
||||
if (!e->engine.data.output) return;
|
||||
if (!e->engine.data.context)
|
||||
|
|
Loading…
Reference in New Issue