Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upConsider splitting the WebGL related code into a separate crate. #1353
Comments
WebGL needs GL context, while ExternalImage does not. Are you suggesting to read back the WebGL surfaces into CPU memory in order to bring it to WR? |
|
I'm assuming we'd use something like rendering to a native texture, and pass that handle to WR. |
|
Very good idea, it will simplify a lot of things for WebGL and WebVR. Could you assign this issue to me? I'd love to work on this ;) |
|
That'd be awesome, please do! |
|
For some reason, GH won't allow me to assign this to you - but that's great if you can work on this! |
|
Fine, I'll work on this ;) My first thought is to move WebGL code into a Servo component. It eases development, testability and I don't think that there are use cases to use the component outside Servo. Anyway, it will be a standalone component, so it will be easy to move if required. It's a good opportunity to work on #607 too. I haven't forgotten about that ;)
Maybe it´s because I'm not in the Servo organization? |
|
That sounds good to me, and working towards solving #607 would be a great benefit too! |
WebGL encapsulation Refactors our WebGL usage and fixes a regression from #1509 also related to #1353 (should make it easier) r? @MortimerGoro cc @glennw <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1530) <!-- Reviewable:end -->
Clients use the external image APIs to provide native WebGL handles or readback buffers. Fixes servo#1353. Fixes servo#607.
Remove WebGL implementation, it's no longer needed. Clients use the external image APIs to provide native WebGL handles or readback buffers. Fixes #1353. Fixes #607. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1587) <!-- Reviewable:end -->
Clients use the external image APIs to provide native WebGL handles or readback buffers. Fixes servo#1353. Fixes servo#607.
Remove WebGL implementation, it's no longer needed. Clients use the external image APIs to provide native WebGL handles or readback buffers. Fixes #1353. Fixes #607. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1587) <!-- Reviewable:end -->
Instead, we could connect WebGL up to WR via the ExternalImage APIs, which support CPU-side buffers and native surface handles.
The primary benefits would be: