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

Missing DrawAtlas method #851

Open
ShirasawaSama opened this issue Dec 24, 2023 · 2 comments
Open

Missing DrawAtlas method #851

ShirasawaSama opened this issue Dec 24, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ShirasawaSama
Copy link

Due to the need to draw a large number of rectangles, but Skiko did not provide Canvas#DrawAtlas method, and calling drawRect multiple times directly can cause performance degradation.

I don't know if the project leader is willing to add it, but if so, I can make a PR.

@dima-avdeev-jb dima-avdeev-jb added the enhancement New feature or request label Dec 26, 2023
@dima-avdeev-jb
Copy link
Contributor

Thanks for Issue. We will discuss in our team

@ShirasawaSama
Copy link
Author

ShirasawaSama commented Dec 27, 2023

After testing, I found that what I really need is Canvas#DrawVertices.

However, there seems to be a problem with this function.

First, the floatarray passed from Java to native code has been copied at least twice.

Secondly, the positionsCount parameter is not really used, so every call must create a ArrayList and then convert to FloatArray, which is also a copy.

Should I close this issue and create a new one? I'm sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants