Using kqmlgraphplugin in Plasma Next
Sebastian Kügler
sebas at kde.org
Sat Feb 1 15:24:57 GMT 2014
Hi,
On Friday, January 31, 2014 21:34:47 Mark Gaiser wrote:
> <snip>
>
> > Canvas based: I have no experience with that but I guess performance is
> > should be better than with QPaintedItem, since it directly renders to a
> > GPU framebuffer and painting can be done in an separate thread.
>
> As far as i know both (canvas and qpainter) are software rendered.
> However, canvas apparently has some option to set the render target
> "Canvas.FramebufferObject" (the default btw) which makes the GPU do
> something the CPU would otherwise do. But it's by far GPU rendered
> otherwise you would be able to do fluid animations with it. Which you
> can't.
For a simple graph, we don't need animations.
Sure, we can come up with a huge number of usecases, all from a "this would
look cool, and maybe someone would even use it, but perhaps not"-point of
view, but that has little bearing on what we actually want and need to do.
The point really is that the Plasma 1 implementation also uses software
rendering, and does a few tricks to limit the repainted area. We can achieve a
similar performance with both, QQuickPaintedItem and canvas, it seems. So to
fill our needs, we're almost good. (Modulo Bhushan finishing the code, but
that means not overloading him with unreasonable expectations.)
>From experiments, Bhushan's code seemed very well able to cover the usecases
we have in Plasma (namely painting a simple, relatively small graph).
> My guess - and i haven't looked in the canvas code - is that canvas is
> using QPainter internally to render everything smooth and sharp and
> then moves the resulting image as a texture to the GPU. Or something
> along those lines.
That's what QQuickPaintedItem does, no?
> For a real hardware accelerates canvas you should open up Chrome and
> go to this link: http://fhtr.org/gravityring/sprites.html I doubt that
> would be possible with the same performance in the QML canvas ;)
This is entirely unrelated. I could post a link to Halflife 2 and say that
it's probably not possible with a canvas. It totally ignores the point,
though: the usecase is completely different (is there a usecase for your
example, anyway?), and a canvas seems to be the wrong tool for the job in this
case as well. Does it have anything to do with graphs? I don't think so.
I think it would be very cool if this would be a shard component in the end,
so both, KTouch and Plasma can utilize it, and improve it further.
Cheers,
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
More information about the kde-core-devel
mailing list