evas: Fix support for image_data_get on snapshot
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 19 Jul 2017 02:43:35 +0000 (11:43 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 19 Jul 2017 04:59:42 +0000 (13:59 +0900)
commit45c8e5e983d24b23b244513087799edcda862411
treeba04703a87cc4993dbbdd451953c3abee5b758a7
parent897d81acb1f7dc20b05b82697e703688990fed1e
evas: Fix support for image_data_get on snapshot

evas_object_image_data_get() is a legacy API that I made work
with snapshot objects (evas_object_image_snapshot_set()). Some
changes in the engine broke the behaviour and this patch fixes
it.

When getting the pixels from an FBO, in read-only mode, we need
to create a temporary image (pixels surface) that contains the
copy of the pixels we get from glReadPixels. This image needs
to be deleted afterwards. It is thus stored by the image object
and freed upon _image_data_set() (good) or object deletion (bad).

FBO + read-write is not supported by this API (it is supported
through buffer_map as the filters had to use that).

Fixes T5754
src/lib/evas/canvas/evas_image_legacy.c
src/lib/evas/canvas/evas_image_private.h
src/lib/evas/canvas/evas_object_image.c