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

support external "image buffer" in Webrender #723

Closed
JerryShih opened this issue Jan 16, 2017 · 2 comments
Closed

support external "image buffer" in Webrender #723

JerryShih opened this issue Jan 16, 2017 · 2 comments

Comments

@JerryShih
Copy link
Contributor

@JerryShih JerryShih commented Jan 16, 2017

@glennw @nical @kvark
Currently, webrender could resolve a gl texture id from a external texture id through the externalImage callback api[1]. Then, webrender could use that gl texture id for rendering.

I think we could also pass raw buffer to webrender, and let webrender to upload this buffer into gl texture. In this way, webrender might use texture atlas for this texture uploading. That could have a better performance in drawing with batching.

We can't just use the wr_add_image() api directly, that api implies some memory copy operations. That's not a good practice for a large image.

I will attach my patch here if I fix the crash in my WIP.

[1]
1cb9ab2

@kvark
Copy link
Member

@kvark kvark commented Jan 16, 2017

So there is going to be at least 3 ways to provide the texture contents:

  1. Data to be consumed by WR via wr_add_image
  2. Shared data to be used by WR without copying (this issue)
  3. Pure Texture ID
@JerryShih
Copy link
Contributor Author

@JerryShih JerryShih commented Jan 17, 2017

@kvark

Yes, there will have 3 different ways to set the texture to WR.

  1. Data to be consumed by WR via wr_add_image(we already have that).
  2. Shared data to be used by WR without copying (this issue. WR will try to get the raw-buffer through the ExternalImageCallback)
  3. Pure gl texture id(we already have that)
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
2 participants
You can’t perform that action at this time.