mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-22 22:28:29 +00:00
examples: fix surface refresh approuchfor webgpu
Move surface refresh approach from engine side to user size.
This commit is contained in:
parent
e7e6839571
commit
4693d7f4c1
1 changed files with 5 additions and 0 deletions
|
@ -436,6 +436,11 @@ struct WgWindow : Window
|
|||
//Set the canvas target and draw on it.
|
||||
verify(canvas->target(instance, surface, width, height));
|
||||
}
|
||||
|
||||
void refresh() override
|
||||
{
|
||||
wgpuSurfacePresent(surface);
|
||||
}
|
||||
};
|
||||
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue