Open remyLmnr opened 1 year ago
Facing the same issue tested on 2 servers with GPU, and didn't manage to get any difference.
same problem, using the .filter function to apply a blur. Does skia-canvas use the gpu for the blur filter?
For reference
The way I'm applying the blur is like this:
context.filter = `blur(5.5px)`;
context.drawImage(canvas, 0, 0, canvas.width, canvas.height)
// canvas is the same canvas that the context belongs to, I'm drawing it onto itself
I can add another computer
same problem
Wait, my bad, it does use the gpu but only when I save the canvas to a file. It's still not any faster when using the gpu though, a little slower even. Also I do some manual pixel manipulation with getImageData and putImageData after the blurring and I don't see how that could be cached until the canvas is saved to file. So it kinda still seems like it's not using the gpu for the blur filter.
I also am having a hard time finding a benefit with GPU rendering enabled.
Not only is it not faster (which is going to depend on the GPU vs. CPU speed I suppose), but it also doesn't use any less CPU time and increases total system memory (RSS) use (and of course also uses VRAM and GPU time). The thread count also doubles, with no apparent benefit.
skia-canvas 1.0.1, NVIDIA RTX 2xxx and 3xxx with latest Studio drivers, Intel i7 and i9 brand CPUs, gen 8+.
(And yea GPU only kicks in when producing the final output, eg. canvas.toBuffer()
or canvas.toFile()
, etc. (also evident from looking at the Rust code, the drawing surface isn't actually created until Page.encoded_as()
is called, which in turn only happens during output).)
Also there is the memory leak I reported earlier, and the strange hang-on-exit issue which is hard to recreate, all related to GPU usage.
In CPU-only mode, SC v1+ in general performs better than the previous versions, which of course is great and makes it worth using just for that. However seems like the GPU feature is maybe not quite ready for production and should be disabled by default.
And I don't mean to disparage, skia-canvas is great and much appreciated! Thanks!
-Max
Hello, we are trying to enable the GPU on skia-canvas but we don't see any difference in rendering speed. We are trying several type of canvas but we don't see any difference.
Context:
Skia-canvas auto detect the GPU and set
.gpu
as true.Vulkaninfo:
nvidia-smi:
Thanks a lot for your work