Skip to content

Conversation

jamesruan
Copy link

Reading back pixels is blocking on WebGL. This is because skia lacks pixel transfer support with out mapping.

WebGL has PBO for async reading, however it use glGetBufferSubData() to read back from PIXEL_PACK_BUFFER instead of mapping

  • add GetBufferSubData to GrGLInterface
  • add GrGpuBuffer::getData()
  • TAsyncReadResult use getData() to copy pixels to cpu plane

Reading back pixels is blocking on WebGL. This is because skia lacks pixel
transfer support with out mapping.

WebGL has PBO for async reading, however it use `glGetBufferSubData()` to read
back from PIXEL_PACK_BUFFER instead of mapping

- add GetBufferSubData to GrGLInterface
- add GrGpuBuffer::getData()
- TAsyncReadResult use getData() to copy pixels to cpu plane
@skia-codereview-bot
Copy link

This PR (HEAD: 3036904) has been imported to Gerrit for code review.

Please visit review.skia.org/833776 to see it. Please CC yourself to the Gerrit change.

Note:

  • Skia uses only Gerrit for reviews and submitting code (doc).
  • All comments are handled within Gerrit. Any comments on the GitHub PR will be ignored.
  • The PR author can continue to upload commits to the branch used by the PR in order to address feedback from Gerrit.
  • Once the code is ready to be merged, a maintainer will submit the change on Gerrit and skia-codereview-bot will close this PR.
  • Similarly, if a change is abandoned on Gerrit, the corresponding PR will be closed with a note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants