Sure, I’ve attached a version with most of the error checking removed. There’s a base/subclass in here, but the bit you’re after (hopefully) is the ContextGLOffScreen constructor.
I should point out that this is used for offscreen rendering, I haven’t tried onscreen MSAA yet 😅
And yes, we’re adding MSAA so that we get anti-aliasing on SkVertices (and hopefully SkMesh when we adopt that) calls. We’re rendering via drawVertices. Would you like to see an example of how we call that specifically?
Worth noting that I am calling resolveMSAA() on the surface before I use makeImageSnapshot() to get the pixel data. I don’t actually know if that’s necessary here.
Best,
Ian