Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Skia SKPaint pooling #2376
What does the pull request do?
Leverages my recent changes to SkiaSharp (mono/SkiaSharp#807) to speed up rendering by avoiding constant allocation of
SkiaSharp did not push any new package yet, so this will have to wait until they release a new version on nuget.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
I thought about this a bit more. Maybe we should cache shaders instead of paint and mutate a single instance of paint instead. We could cache resources like shaders per DrawingContext. There are some situations where we need a new instance of paint but the common scenario just needs one per DrawingContext.
This approach would make it easier to control aliasing and interpolation. A draw call would not need an extra parameter for filter, interpretation, aliasing and instead we configure this on the DrawingContext's paint.