[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Why custom flushBuffer code?
From:       Martin =?ISO-8859-1?Q?Gr=E4=DFlin?= <kde () martin-graesslin ! com>
Date:       2010-12-02 5:52:25
Message-ID: 1291269145.3504.2.camel () Nokia-N900-51-1
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic