window resizing error (graphite/dawn backend )

72 views
Skip to first unread message

刘晓伦

unread,
Jan 17, 2025, 9:01:53 AMJan 17
to skia-discuss
OS: Windows 10
Backend: graphite/dawn
Error:
dawn.gif
Key Code:
```
case WM_SIZE: {
    win->w = LOWORD(lParam);
    win->h = HIWORD(lParam);
    win->configSurface();
    return 0;
 }
```
```
void WindowMain::configSurface()
{    
    wgpu::SurfaceConfiguration config;
    config.device = dawnDevice;
    config.format = surfaceFormat;
    config.usage = wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::TextureBinding |
        wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst;
    config.width = w;
    config.height = h;
    config.presentMode = wgpu::PresentMode::Fifo;
    dawnSurface.Configure(&config);
}
```


刘晓伦

unread,
Jan 27, 2025, 9:12:11 AMJan 27
to skia-discuss
I think there might be a issue with the sample code when dealing with window size changes

tools\window\win\GraphiteDawnD3D12WindowContext_win.cpp

```
void GraphiteDawnD3D12WindowContext_win::resize(int w, int h) {
    configureSurface();
}
```

Reply all
Reply to author
Forward
0 new messages