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

Add getBuffer to NativeImage #6733

Merged
merged 3 commits into from Aug 5, 2016

Conversation

Projects
None yet
3 participants
@brenca
Member

brenca commented Aug 4, 2016

@kevinsawicki

This comment has been minimized.

Contributor

kevinsawicki commented Aug 5, 2016

Would calling image.getBitmap() be the same as just doing Buffer.fromBuffer(image.toBitmap())?

@brenca

This comment has been minimized.

Member

brenca commented Aug 5, 2016

@kevinsawicki Calling .toBitmap() would create a copy of the buffer data owned by the Buffer itself while .getBitmap() creates a Buffer that just wraps the existing data, and does not own it, for performance reasons. (a memcpy can be avoided)

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Aug 5, 2016

👍

@zcbenz zcbenz merged commit 210d9cd into electron:osr-refactor Aug 5, 2016

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