# Render API Migration Table (OC -> LN Swift)

> 当前阶段结论：Render 已完成 **LN API + 可运行基线实现**，并新增 **Swift Metal 主路径**（HWD 全链路 + VAP 背景/merge/mask/blur），`LNHWDMP4OpenGLView` 也已改为 Swift 主路径（内部走 LN renderer）；仍需做 **视觉行为对齐**。
> 为保证工程可编译与双 Demo 可联调，仍保持不向 umbrella 暴露非模块化私有头。

## Metal / OpenGL View & Renderer

| OC Class | OC API | Swift Class | Swift API | Status |
|---|---|---|---|---|
| `QGHWDMetalRenderer` | `-initWithMetalLayer:blendMode:` | `LNHWDMetalRenderer` | `init(metalLayer:blendMode:)` | Baseline Done / Parity Pending |
| `QGHWDMetalRenderer` | `-renderPixelBuffer:metalLayer:` | `LNHWDMetalRenderer` | `renderPixelBuffer(_:metalLayer:)` | Baseline Done / Parity Pending |
| `QGHWDMetalRenderer` | `-dispose` | `LNHWDMetalRenderer` | `dispose()` | Baseline Done |
| `QGHWDMetalView` | `-initWithFrame:blendMode:` | `LNHWDMetalView` | `init(frame:blendMode:)` | Baseline Done / API Alias Done |
| `QGHWDMetalView` | `-display:` | `LNHWDMetalView` | `display(_:)` | Baseline Done / Parity Pending |
| `QGHWDMetalView` | `-dispose` | `LNHWDMetalView` | `dispose()` | Baseline Done |
| `QGVAPMetalRenderer` | `-initWithMetalLayer:` | `LNVAPMetalRenderer` | `init(metalLayer:)` | Baseline Done / Parity Pending |
| `QGVAPMetalRenderer` | `-renderPixelBuffer:metalLayer:mergeInfos:` | `LNVAPMetalRenderer` | `renderPixelBuffer(_:metalLayer:mergeInfos:)` | Swift Core Done / Parity Pending |
| `QGVAPMetalRenderer` | `-dispose` | `LNVAPMetalRenderer` | `dispose()` | Baseline Done |
| `QGVAPMetalView` | `-display:mergeInfos:` | `LNVAPMetalView` | `display(_:mergeInfos:)` | Baseline Done / API Alias Done |
| `QGVAPMetalView` | `-dispose` | `LNVAPMetalView` | `dispose()` | Baseline Done |
| `QGHWDMP4OpenGLView` | `-setupGL` | `LNHWDMP4OpenGLView` | `setupGL()` | Swift 主路径 Done |
| `QGHWDMP4OpenGLView` | `-displayPixelBuffer:` | `LNHWDMP4OpenGLView` | `displayPixelBuffer(_:)` | Swift 主路径 Done / Parity Pending |
| `QGHWDMP4OpenGLView` | `-dispose` | `LNHWDMP4OpenGLView` | `dispose()` | Baseline Done |
| `QGHWDMP4OpenGLView` | `-updateBackingSize` | `LNHWDMP4OpenGLView` | `updateBackingSize()` | Baseline Done |

## Utility

| OC Class | OC API | Swift Class | Swift API | Status |
|---|---|---|---|---|
| `QGVAPMetalShaderFunctionLoader` | `-initWithDevice:` | `LNVAPMetalShaderFunctionLoader` | `init(device:)` | Baseline Done |
| `QGVAPMetalShaderFunctionLoader` | `-loadFunctionWithName:` | `LNVAPMetalShaderFunctionLoader` | `loadFunction(withName:)` | Baseline Done |

## Files

- `/Users/yanxuyao/Vap/QGVAPlayer/QGVAPlayer/LNSwift/Render/LNRenderers.swift`
