I wouldn't know when i'd need texture from pixmap, is that to upload textures from system ram? Or something more specific.
-
-
Replying to @rikarends @chadaustin
It's for sharing textures across threads/processes. Support for that is the main reason why I'm writing a glutin replacement right now.
2 replies 0 retweets 0 likes -
I thought there won’t be any cross-process texture sharing on macOS anymore?
1 reply 0 retweets 0 likes -
It uses surfaces as a way to safely share send texture data between threads. Happier?
1 reply 0 retweets 0 likes -
Replying to @asajeffrey @pcwalton and
Oh cross threads! Ok that makes more sense.
1 reply 0 retweets 0 likes -
Servo makes sure that any threads using the GPU are all in the same process. There might be clever way to get surfaces sent between processes, but we're not using it.
1 reply 0 retweets 0 likes -
Replying to @asajeffrey @pcwalton and
There are definitely support for IPC surfaces in the serde serialisation stuff, and we mark surfaces on macOS global for that very purpose. Glad to know we don’t actually use that though.
1 reply 0 retweets 0 likes -
Replying to @nokusu @asajeffrey and
There are ways to send surfaces cross-process on each OS. In fact, they're basically the same ways surfman sends them across threads. They require some extra APIs surfman doesn't use yet, though. e.g. on macOS you can convert an IOSurface to a Mach port and back.
2 replies 0 retweets 0 likes -
You don't have to mark a surface global to use these APIs. I don't bother to wrap those APIs at the moment because we shouldn't be sending surfaces cross-process in general. Any process that can access the GPU should basically be considered trusted.
1 reply 0 retweets 0 likes -
Replying to @pcwalton @asajeffrey and
Why does Firefox do that then? I've searched for a long time, and AFAICT that's the only way to share surfaces.
1 reply 0 retweets 0 likes
Because the content process can access the GPU in Firefox. This is a large security deficiency in Firefox relative to Chrome :( They're actively fixing it.
-
-
Replying to @pcwalton @asajeffrey and
Oh, I misunderstood things about the Mach ports. https://bugs.chromium.org/p/chromium/issues/detail?id=323304 …
1 reply 0 retweets 0 likes -
Replying to @nokusu @asajeffrey and
In general, it's too risky to put content JS and GPU access in the same process. GPU drivers are just too buggy, especially on macOS. Even an out-of-bounds VRAM read could be used to effectively take screenshots of the user's desktop.
2 replies 1 retweet 3 likes - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.