Skip to content

Conversation

@player-03
Copy link
Contributor

This improves performance when doing pixel operations, at the expense of rendering speed. But you don't have to render it; you could designate one bitmap as a source, never adding it to the display list. Instead, you'd copy its pixels to other bitmaps that would be rendered.

Currently only implemented for HTML5, but the same logic should apply on other platforms, so I'm keeping this as a draft for now. Unless those other platforms already store a copy of the data for easy reading?

Another reason this is a draft is it's not a pretty implementation. It would be nicer to either take this as a constructor argument, or allow changing it later, but both of those have problems. If it's a constructor argument, then we also have to modify openfl.display.BitmapData. If you can modify it, then we need to delete the existing canvas and make a new one, and maybe also synchronize some other state (not sure).

Closes #1690

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.

1 participant