mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
fix(app): avoid a white flash when the pin board folds back into the wordmark (#57625)
This commit is contained in:
committed by
GitHub
Unverified
parent
34d69cbe81
commit
25d8e19a52
@@ -102,8 +102,12 @@ export function createQuads(canvas: HTMLCanvasElement, restored: () => void) {
|
||||
drawCanvas(surface.current.ctx, region, scale)
|
||||
},
|
||||
dispose() {
|
||||
if (surface.current && "gl" in surface.current)
|
||||
surface.current.gl.getExtension("WEBGL_lose_context")?.loseContext()
|
||||
const current = surface.current
|
||||
if (!current || !("gl" in current)) return
|
||||
// Losing the context in the frame the canvas leaves the page lets the compositor redraw the last
|
||||
// frame from a released buffer, which some GPUs show as a one-frame white flash. Drop it once the
|
||||
// canvas is gone instead.
|
||||
setTimeout(() => current.gl.getExtension("WEBGL_lose_context")?.loseContext(), 250)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user