Implement ApplicationHandler::can_create|destroy_surfaces() (#3765)
This commit is contained in:
parent
a0d69c782a
commit
75ce71f05a
21 changed files with 178 additions and 114 deletions
|
|
@ -441,9 +441,11 @@ impl Shared {
|
|||
}
|
||||
|
||||
pub fn init(&self) {
|
||||
// NB: For consistency all platforms must emit a 'resumed' event even though web
|
||||
// applications don't themselves have a formal suspend/resume lifecycle.
|
||||
self.run_until_cleared([Event::NewEvents(StartCause::Init), Event::Resumed].into_iter());
|
||||
// NB: For consistency all platforms must call `can_create_surfaces` even though web
|
||||
// applications don't themselves have a formal surface destroy/create lifecycle.
|
||||
self.run_until_cleared(
|
||||
[Event::NewEvents(StartCause::Init), Event::CreateSurfaces].into_iter(),
|
||||
);
|
||||
}
|
||||
|
||||
// Run the polling logic for the Poll ControlFlow, which involves clearing the queue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue