<div dir="ltr">Drawing only a portion of the canvas should be an old tech/improvement and double buffering is an old technique too to avoid flickering when repainting.. so.. they should just work.<div>About the artifacts, isn't that because we don't correctly calculate the texture update bounds? Because i wouldn't see other cases where that could be an issue.</div><div><br></div><div>About our current partial updates, we update internally only part of the texture but then we draw it fully to the screen (glClear on all and then call our drawImage function, which again doesn't check which parts are changed).</div><div>So also the artifacts are actually because of some bugged code, not because we do partial screen updates (which we don't).</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-14 9:15 GMT+01:00 Boudewijn Rempt <span dir="ltr"><<a href="mailto:boud@valdyas.org" target="_blank">boud@valdyas.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's worth a try, but at least in some point of time we already didn't update all of the screen, even in in opengl mode, didn't we? I know we had problems with that on AMD. It also sounds like we might be running into the same problems we have with the GPU canvas, namely small artefacts at the update bounds. If we keep that in mind, it's definitely worth a try, anything that improves performance always is!<div class="HOEnZb"><div class="h5"><br>
<br>
On Sun, 14 Feb 2016, Dmitry Kazakov wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, all!<br>
<br>
Today I was talking to Maxim (Salabar) and we found quite an interesting idea, which could optimize our openGL rendering pipeline a lot, and would make our dependency on glSync less<br>
important (glSync is an extension, and it is not present on some (older) GPUs).<br>
<br>
The point is that starting with Qt 5, our paintGL() implementation does not draw our canvas directly on screen. Instead it is drawn on an internal Qt's framebuffer, which is (later)<br>
painted on screen buffers, which are swapped double buffering. I'm not going to discuss whether such global decision in Qt is good or bad, but for us it means that now we can use<br>
partial updates, which (starting with Qt5.5) can be activated with a special call QOpenGLWidget::setUpdateBehavior(). What does it mean? It means that we shouldn't repaint the whole<br>
canvas every time and we need *not* spend quite a lot of time in our High Quality scaling shader, which is really slow. Instead, we can update only a portion of the screen, spend a<br>
little time on shading this small portion and store in this internal Qt's buffer. Of course in some special cases glSync will still be needed, but I bet that in 90% of the use cases<br>
such partial updates will execute really fast!<br>
<br>
What do you think about this idea? <br>
<br>
<br>
--<br>
Dmitry Kazakov<br>
<br>
<br>
</blockquote>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Boudewijn Rempt | <a href="http://www.krita.org" rel="noreferrer" target="_blank">http://www.krita.org</a>, <a href="http://www.valdyas.org" rel="noreferrer" target="_blank">http://www.valdyas.org</a></font></span><br>_______________________________________________<br>
Krita mailing list<br>
<a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kimageshop</a><br>
<br></blockquote></div><br></div>