Confirmed users
1,643
edits
| Line 13: | Line 13: | ||
=== VsyncDispatcher === | === VsyncDispatcher === | ||
VsyncDispatcherHost/Client stands at the key position of Project Silk. The main role of this object is | VsyncDispatcherHost/Client stands at the key position of Project Silk. The main role of this object is | ||
# | # Receive HW vsync-event from vsync driver. | ||
# Real time dispatching vsync event to registered-event listeners. | # Real time dispatching vsync-event to registered-event listeners. | ||
There is exactly one VsyncDispatcherHost object in chrome process and one VsyncDispatcherClient in each content process. | There is exactly one VsyncDispatcherHost object in chrome process and one VsyncDispatcherClient in each content process. | ||
In chrome process | In chrome process | ||
* VsyncDispatcherHost creates a dedicated thread, named as <b>vsync dispatcher thread</b>, to dispatch vsync-event. Since vsync-event dispatching is very performance sensitive, we create a dedicate thread which only works on event dispatching to prevent transmission flow from being blocked by irrelevant tasks. | * VsyncDispatcherHost creates a dedicated thread, named as <b>vsync dispatcher thread</b>, to dispatch vsync-event. Since vsync-event dispatching is very performance sensitive, we create a dedicate thread which only works on event dispatching to prevent transmission flow from being blocked by irrelevant tasks. | ||
* Receive HW vsync events from HWComposer. On platforms which have no HW vsync supported, it's fallback to SW vsync driver automatically. | * Receive HW vsync events from HWComposer. On platforms which have no HW vsync supported, it's fallback to SW vsync driver automatically. | ||
* Export registry | * Export registry functions to clients who want to receive vsync-event notification. | ||
* | * Sent vsync notifications to registered listeners, on the <b>vsync dispatcher thread</b>. | ||
In Content process, what VsyncDispatcherClient does is relatively simpler: | In Content process, what VsyncDispatcherClient does is relatively simpler: | ||