eglCreateContext's third parameter is defined as:
share_context
Specifies another EGL rendering context with which to share data, as defined
by the client API corresponding to the contexts. Data is also shared with all
other contexts with which share_context shares data. EGL_NO_CONTEXT
indicates that no sharing is to take place.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/e3433443-06b1-49a6-8d3f-9fc8a952349fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/4bcd2cbd-2057-4bd4-aa3e-d55baf6601e7n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/b1eb1486-4676-4a16-9f7d-fd26a03017d6n%40googlegroups.com.
Thank you so much, Greg, for your comprehensive response! I'm confident that many others will appreciate this information as well, especially considering the scarcity of resources on this topic online.
I must admit, I'm somewhat surprised to learn that creating images in parallel with Skia/GPU – specifically in background threads for later use in the main UI thread – isn't as straightforward as I hoped. It seems a bit complex to generate images in the background and then seamlessly integrate them into the main UI SkSurface.
From what I understand, the viable approach is to establish N OpenGL contexts within a share group, coupled with N GrDirectContexts. In each thread, I would need to create a unique OpenGL Texture ID, encapsulate it within a GrBackendTexture, and then construct an SkSurface on top of this GrBackendTexture for rendering. Upon completion, this OpenGL texture ID must be transferred to the main UI thread. There, it would require recreation into a new GrBackendTexture, followed by the generation of a new SkSurface, and ultimately converting this into an SkImage for rendering on the main UI's GPU-based SkSurface. So, there's no straightforward method to pass an SkImage, created on a background thread (on the top of an OpenGL Texture ID), directly to the main UI thread?
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/abf1ad9f-7f3d-4045-86d9-ed42a1136ed6n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/572de1e1-74f8-4905-929b-988fc28eaef5n%40googlegroups.com.
IIRC Skia used to have some support for fences but that was removed
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CALsh4BfM0uke3WaQqhHmpEcQLbG-HdYCaY0aiVBK2yD9Rtm91w%40mail.gmail.com.
IIRC Skia used to have some support for fences but that was removedI'm pretty sure all backends still support gpu to gpu synchronization with semaphores (this would be fences in GL under the hood). We did recently remove the generic GrFence object, but that is a different use case and even for that GLs underlying code for it is still active.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CAL_WtP5BEWX9wTmb7vRQVwyDKHXtn6Wvw8Kzc%2BVckvxYPzTLFg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CALsh4BfPEHsFauFJTzc0FyphLX2XCO%2B21O-h5E-3rCunPWe8ew%40mail.gmail.com.