wayland-egl-tizen: add new API to set pre_commit callback.
Set pre-commit callback with data to wl_egl_window.
The registered callback function will be called with the data
immedately before the frame's wl_surface_commit.
The callback registered before calling eglSwapBuffers will be called
at the time the swap requested buffer is attached.
* Important *
- Since the callback may be called from a separate thread that performs
wl_surface_commit, protection is required if there is a critical section
inside the callback function.
- To avoid poor performance or complicated lifecycle issues,
it is recommended that the behavior inside the callback function be concise.
- This API should be called from one thread.
- If it is called multiple times in a frame, the previously registered ones
are overwritten.
* Callback Options *
- ONCE : The registered callback and data are stored in the buffer requested
for swap when calling eglSwapBuffers and then initialized.
The callback function is called only once when the buffer requested
for swap is committed, and is not called after that.
- CONTINUOUS : Once the callback and data are registered, the callback function
is called continuously until it is released.
To release the callback, simply pass NULL to func.
Change-Id: Ic08c6dd1aeafe88d4059760f6bbffbd9d0da8c05
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>