[PATCH 2/3] compositor-drm: Add option to disable early buffer release

Pekka Paalanen ppaalanen at gmail.com
Tue Nov 19 05:55:44 PST 2013


On Tue, 19 Nov 2013 14:51:42 +0200
Ander Conselvan de Oliveira <conselvan2 at gmail.com> wrote:

> On 11/19/2013 01:05 PM, Pekka Paalanen wrote:
> > On Tue, 19 Nov 2013 11:30:11 +0200
> > Ander Conselvan de Oliveira <conselvan2 at gmail.com> wrote:
> >
> >> From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> >>
> >> This together with a follow up patch should make it possible to do a
> >> runtime renderer switch without causing artifact on the screen.
> >> ---
> >>   man/weston-drm.man   |    6 ++++++
> >>   src/compositor-drm.c |   27 +++++++++++++++++----------
> >>   src/compositor.c     |    1 +
> >>   3 files changed, 24 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/man/weston-drm.man b/man/weston-drm.man
> >> index 35d62ae..d3d0b70 100644
> >> --- a/man/weston-drm.man
> >> +++ b/man/weston-drm.man
> >> @@ -106,6 +106,12 @@ instead of the default seat
> >>   Launch Weston on tty
> >>   .I x
> >>   instead of using the current tty.
> >> +.TP
> >> +.B \-\-disable\-early\-buffer\-release
> >> +Don't release buffers early and instead keep references to them as
> >> +long as any surface uses them, even if the compositor has an
> >> +internal copy of the buffer contents. This causes some clients to
> >> +allocate more memory than necessary.
> >
> > Hi Ander,
> >
> > I wonder, would it make more sense to call that --allow-renderer-switch
> > instead?
> >
> > That way, if you define switching will work only once, then after the
> > switch to the GL renderer you could enable the early release and get
> > rid of the penalties from disabling it.
> 
> Yeah, that's what I've done in the previous series. But it just occurred 
> to me that the pixman renderer keeps the buffers around anyway (it 
> doesn't copy it) so I could just replace c->disable_buffer_release (or 
> c->allow_renderer_switch) with c->use_pixman and get the same effect 
> without any extra options. How about that?

That's fine by me. I haven't seen anyone interested in any other
switching cases than pixman -> GL, so might as well limit to that for
now.


Thanks,
pq


More information about the wayland-devel mailing list