| 369 | const uint32_t kHeight = 150; |
| 370 | |
| 371 | void frame(void* vp_scope) { |
| 372 | auto scope = std::unique_ptr<ScopedCounter>(reinterpret_cast<ScopedCounter*>(vp_scope)); |
| 373 | |
| 374 | wgpu::SurfaceTexture surfaceTexture; |
| 375 | surface.GetCurrentTexture(&surfaceTexture); |
| 376 | |
| 377 | wgpu::TextureView backbuffer = surfaceTexture.texture.CreateView(); |
| 378 | render(backbuffer, canvasDepthStencilView); |
| 379 | |
| 380 | // Test should complete when runtime exists after all async work is done. |
| 381 | emscripten_cancel_main_loop(); |
| 382 | } |
| 383 | |
| 384 | void run() { |
| 385 | init(); |