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:
Jonathan Schwender 2024-08-30 21:25:50 +08:00 committed by GitHub
parent a58d816319
commit 8a0c7487e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 83 additions and 9 deletions

View file

@ -196,7 +196,11 @@ pub extern "C" fn Java_org_servo_servoview_JNIServo_performUpdates<'local>(
_class: JClass<'local>,
) {
debug!("performUpdates");
call(&mut env, |s| s.perform_updates());
call(&mut env, |s| {
s.perform_updates()?;
s.present_if_needed();
Ok(())
});
}
#[no_mangle]