Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider splitting the WebGL related code into a separate crate. #1353

Closed
glennw opened this issue Jun 9, 2017 · 7 comments
Closed

Consider splitting the WebGL related code into a separate crate. #1353

glennw opened this issue Jun 9, 2017 · 7 comments

Comments

@glennw
Copy link
Member

@glennw glennw commented Jun 9, 2017

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:

  • Simplify the internals of resource cache by removing the GL context management code.
  • Remove the WebGL cargo feature, since not all clients use it.
@kvark
Copy link
Member

@kvark kvark commented Jun 9, 2017

we could connect WebGL up to WR via the ExternalImage APIs

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?

@emilio
Copy link
Member

@emilio emilio commented Jun 9, 2017

I'm assuming we'd use something like rendering to a native texture, and pass that handle to WR.

@MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Jun 20, 2017

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 ;)

@emilio
Copy link
Member

@emilio emilio commented Jun 20, 2017

That'd be awesome, please do!

@glennw
Copy link
Member Author

@glennw glennw commented Jun 20, 2017

For some reason, GH won't allow me to assign this to you - but that's great if you can work on this!

@MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Jun 20, 2017

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 ;)

For some reason, GH won't allow me to assign this to you - but that's great if you can work on this!

Maybe it´s because I'm not in the Servo organization?

@glennw
Copy link
Member Author

@glennw glennw commented Jun 20, 2017

That sounds good to me, and working towards solving #607 would be a great benefit too!

@stshine stshine assigned stshine and unassigned stshine Jul 12, 2017
bors-servo added a commit that referenced this issue Jul 28, 2017
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 -->
glennw pushed a commit to glennw/webrender that referenced this issue Aug 17, 2017
Clients use the external image APIs to provide native
WebGL handles or readback buffers.

Fixes servo#1353.
Fixes servo#607.
bors-servo added a commit that referenced this issue Aug 18, 2017
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 -->
glennw pushed a commit to glennw/webrender that referenced this issue Aug 18, 2017
Clients use the external image APIs to provide native
WebGL handles or readback buffers.

Fixes servo#1353.
Fixes servo#607.
bors-servo added a commit that referenced this issue Aug 18, 2017
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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.