Hello,
I have a number of questions regarding rendering multiple surfaces in separate threads (1 surface per thread).
it is stated that "all SkSurfaces that will be rendered to using the same OpenGL context or Vulkan device should share a GrContext".
So, if I understand this correctly:
1) When using Vulkan, I need to create 1 Vulkan device, then create 1 GrContext from it, then I need to create a SkSurface in each thread, passing the same GrContext, then I can safely draw to the surfaces in parallel. Is this correct? Can I create new surfaces or destroy old surfaces while other surfaces are being drawn to?
2) When using OpenGL, I need to create an OpenGL context in each thread, a corresponding GrContext in the thread, then create a SkSurface in the thread, passing the GrContext that correnponds to the thread, and then the rest is the same as when using Vulkan. Is this correct? What if the OpenGL contexts are shared, will it cause any problems between different GrContexts?
Thanks