From kwin Thu Dec 02 05:52:25 2010 From: Martin =?ISO-8859-1?Q?Gr=E4=DFlin?= Date: Thu, 02 Dec 2010 05:52:25 +0000 To: kwin Subject: Re: Why custom flushBuffer code? Message-Id: <1291269145.3504.2.camel () Nokia-N900-51-1> X-MARC-Message: https://marc.info/?l=kwin&m=129126909224691 Thanks for the info. So it was pure luck that it works for me as I use Mesa for my testing. I will try to use framebuffer blit, if available. That should yield a better performance. Martin P.s. Sorry for TOFU - writing on my mobile ----- Ursprüngliche Mitteilung ----- > On Wednesday 01 December 2010, Martin Gräßlin wrote: > > Hi, > > > > can anyone explain me why we need the code in > > void SceneOpenGL::flushBuffer( int mask, QRegion damage ) > > for double buffering? > > > > I just tried to implement it with ES and none of the used API calls is > > present. There is neither an equivialent to glxCopySubBuffer nor the > > glBitmap/glCopyPixel combo. > > > > So my ES code is currently running without anything in paintBackground > > and  without anything in flushBuffer except eglSwapBuffer. And it's > > working fine. I  cannot notice any problems. > > > > So if there is no reason for that code, I would dare to remove the > > flushBuffer  and paintBackground code. This should improve the > > rendering quite a lot as  it's many glScissor followed by single quad > > painting. > > The contents of the back buffer is undefined after a call to > SwapBuffers(), so you have to do a full repaint afterwards. > > Most Mesa drivers currently implement SwapBuffers() by blitting the > contents of the back buffer to the front buffer, after which the contents > of the buffers is identical. When it's implemented this way it's possible > to do partial updates with SwapBuffers(), but KWin can't depend on it. > > The DRM recently gained a new pageflip ioctl that makes it possible for > DRI2 drivers to implement page flipping properly. But as far as I know > the only driver that supports it in a released version is the Intel > driver. Radeon also supports it in the drm-next branch, but it won't be > merged until the 2.6.38 merge window. > > Regards, > Fredrik > > _______________________________________________ > kwin mailing list > kwin@kde.org > https://mail.kde.org/mailman/listinfo/kwin _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin