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

[FEATURE] Please expose SKCanvas.WritePixels() method #3195

Open
1 task done
najak3d opened this issue Mar 11, 2025 · 0 comments
Open
1 task done

[FEATURE] Please expose SKCanvas.WritePixels() method #3195

najak3d opened this issue Mar 11, 2025 · 0 comments

Comments

@najak3d
Copy link

najak3d commented Mar 11, 2025

Is your feature request related to a problem?

We'd like to be able to blit straight from a PixelBuffer in RAM direct to an existed (and re-used) SKSurface (which is sized/formatted the same as our pixel buffer).

We do a TON of this, including this Raster Map tile example that we just resolved.

Example: Our App Animates Weather (images) -- we have the images in RAM in "code-runLength" quick compression mode, which we then send to the GPU to render the resulting Image.

So as we animate, currently, these images are decompressed JIT, into a fixed Pixel Buffer (the same one for all frames), and then we are creating SKImage from it, each frame, and then use DrawImage to our render surface. (which is a full 1:1 copy of the image)... Then our render pipeline Draws this full Image (enscribed onto the Surface) onto the final Screen Render Surface (using Matrix manipulations to scale/rotate/translate it)...

It would be nice to just go from "PixBuffer" to "Surface" each frame without creating this SKImage chaff as middleman.

Describe the solution you would like

Please expose SKIA's SKCanvas.WritePixels() method as is.

Describe alternatives you have considered

The alternative is what we use now, which is "DrawImage()" which seems to be creating a new middleman SKImage as the first step, which is then used to blit pixels, and then is disposed right after. Conceptually, this is a meaningless step.

Additional context

I'm in love with Matt Leibow. He is our hero. :)

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

1 participant