Implement Delegate renderer using frame buffer object on Tizen.
In Tizen, only web contents parts of the browser window in an OpenGL surface
drawn by chromium. The rest of the window is drawn using evas reference
browser/mini browser. This is because we don't have a way to draw on native
surface. evas direct rendering does not support calling native surface swap
from different thread.
To solve this problem, we composite to intermediate texture and use this
texture for rendering on evas native surface.
1. When renderer has new frame that it wants drawn, it sends a
ViewHostMsg_SwapCompositorFrame to browser process.
2. Browser process takes frame from renderer and passes to RWHV.
3. Frame is passed to DelegatedFrameHost (DFH), which acts as interface
between ui::Compositor and the renderer.
4. DFH tells the ui::Compositor to draw a new frame with updated
contents.
5. ui::Compositor requests for commit operation(to draw frame).
6. On receiving commit, ui::Compositor renders frame onto frame buffer
object created by MailboxOutputSurfaceEfl::EnsureBackBuffer().
7. When done drawing the frame, ui::Compositor's
cc::LayerTreeHostImpl's cc:OutPutSurface will issue glSwapBuffers
to GPU process.
cc::Compositor will be blocked until cc::OutPutSurface client calls
its OnSwapBuffersComplete().
8. The command buffer will decode and call
MailboxOutputSurfaceEfl::SwapBuffers(), this will send texture_id
from FBO to RWHV and calls evas_object_image_pixels_dirty_set() to
invalidate evas surface and draw updated texture by calling
glBindTexture(texture_id).
9. After this, cc::Compositor is unblocked, allowing the
ui::Compositor to produce more frames. DFH::SendDelegatedFrameAck
is called, which sends ViewHostMsg_SwapCompositorAck to the renderer
process to produce another frame.
Reviewed by: DaeHyun Ko, KwangHyuk Kim, Prashant Nevase
Change-Id: I539f8aa0333a5a0dde6c921085af11ca7d9c1dc4
Signed-off-by: venu.musham <venu.musham@samsung.com>