I set context to nullptr in webgl context lost. I am sure the sk_sp<GrDirectContext> is unique before set it to nullptr.
Then create a new context in webgl context restored.
auto interface = GrGLMakeNativeInterface();
context_ = GrDirectContext::MakeGL(interface);
But the path render result is werid after I sleep my mac then wake it.
Before sleep my mac:
After wake my mac:
The werid render result only happens in iMac 2020, AMD Radeon Pro 5500 XT 8G
It works fine in Mac mini
I use skia m106, emscripten 3.1.17