1.2 KiB
1.2 KiB
Chapter 44
T50b Rendering · Surface — src/rendering
gpui at 1a28cff paints pixels three ways: RenderImage through paint_image on every platform and the web; CVPixelBuffer through paint_surface, NV12 on macOS alone, dropped by the wgpu and DirectX renderers; a native view over the window. It shares no device and runs no outside shader.
- RenderSurface — the host draws a frame at the box's size in device pixels; a new size or revision draws again; the old frame leaves the atlas
- FramebufferView / OffscreenRenderSurface / CustomRendererSurface / TextureView →
rendering::RenderSurface - ShaderView / GpuSurface / WebGPUSurface / Compute Visualization / GPU Particle View —
host: the host renders on its own device and reads back intorendering::RenderSurface - CameraTexture / GStreamerTexture / ExternalTexture —
host: the host's frames reachrendering::RenderSurface - ZeroCopyTexture / SharedTextureView —
blocked: only macOS's Metal renderer drawspaint_surface, NV12 alone - MetalSurface / OpenGLSurface / VulkanSurface / D3D11/D3D12Surface —
blocked: gpui shares no device; a host renders offscreen and feedsrendering::RenderSurface - 3D Scene / 3D Viewport →
media::ModelViewer