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
Don't create a new shader in every call to onDraw(). #23
Comments
👍 although onDraw would only be called up to 60times /seconds if you were animating the size of the view or something |
Or if it's in a list that scrolls :) |
@simonedstromsi not as far as i'm aware - it will simply be snapshotted and moved, ondraw won't be called |
Ok :) I wasn't aware of that. |
@lopspower this is still an issue isn't it. AFAICT this is still the case... can submit a PR if you like, normally it just requires overriding onSizeChanged |
Yes if you can, I want a PR :) (Please update your repos before that) |
Done :) |
Creating a new shader and bitmap in every call to onDraw (up to 60times / second) is very bad for performance.
Try creating the shader in onSizeChanged() to make sure your bitmap has the right size.
The text was updated successfully, but these errors were encountered: