-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
The current implementation of the canvaskit renderer abandons the current gl context and creates a new one when resizing the window. This is an expensive operation, and causes the loss of all GPU backed textures associated with the previous context. At least part of the issue in #117786 is due to using a separate context, which I think is due partially to needing to deal with this on resize.
I don't think this should be necessary, its fairly straightforward to resize a canvas using webgl/webgl2 (see https://webgl2fundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html ). If we're missing APIs in Skia/Canvaskit then we should get those added instead of working around the problem.