mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
ohos: Present on vsync signals (#33117)
Rely on callbacks from the vertical synchronization driver, to drive presentation. Future commits will base animation updates and touchless gestures like fling off these vsync events. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
a58d816319
commit
8a0c7487e7
6 changed files with 83 additions and 9 deletions
|
@ -39,7 +39,13 @@ pub trait HostTrait {
|
|||
/// Page animation state has changed. If animating, it's recommended
|
||||
/// that the embedder doesn't wait for the wake function to be called
|
||||
/// to call perform_updates. Usually, it means doing:
|
||||
/// while true { servo.perform_updates() }. This will end up calling flush
|
||||
/// ```rust
|
||||
/// while true {
|
||||
/// servo.perform_updates();
|
||||
/// servo.present_if_needed();
|
||||
/// }
|
||||
/// ```
|
||||
/// . This will end up calling flush
|
||||
/// which will call swap_buffer which will be blocking long enough to limit
|
||||
/// drawing at 60 FPS.
|
||||
/// If not animating, call perform_updates only when needed (when the embedder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue