fixup! [MM] Fix flickering when playing video.
Previous patch relied mostly on CleanUp() for releasing
used tbm_surface. But it has issues like
- It causes that many number of tbm_surfaces are pended for releasing,
because compositor sometimes does not signal to release.
This causes locking on capi-player because capi-player has constraints
on output tbm_surface counts.
- CleanUp() is cost operation.
This fixup introduces Closure to bound the lifecycle of
tbm_surface with VideoFrame by following the Chromium's VideoFrame approach.
(So no more hack is required on GLImage for releasing tbm_surface.)
When Chromium invalidates the VideoFrame, tbm_surface will also be released.
For this approach, this fixup introduces IPC message for releasing tbm_surface,
so any process/thread can request to release tbm_surface.
(On previous approach, Browser-Process can only request releasing tbm_surface).
By taking this approach, it's guaranteed that every tbm_handles are
requested to be released, so CleanUp is removed.
Bug: http://165.213.149.170/jira/browse/TSAM-676
Bug: http://165.213.149.170/jira/browse/TSAM-662
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15255
Bug: http://suprem.sec.samsung.net/jira/browse/CBEFL-835
Reviewed by: msu.koo, sm.venugopal, sns.park
Change-Id: I9c622396402ec34e0aa77e28bff7bf3e937f83eb
Signed-off-by: msu.koo <msu.koo@samsung.com>