[PATCH] composite: Optimize resizes of ForgetGravity windows
Adam Jackson
ajax at redhat.com
Mon Jul 28 14:15:24 PDT 2014
On Mon, 2014-07-28 at 13:04 -0700, Keith Packard wrote:
> Adam Jackson <ajax at redhat.com> writes:
> > For redirected windows, size changes hit compReallocPixmap, which
> > normally attempts to preserve the previous pixmap in cw->pOldPixmap.
> > For ForgetGravity windows we now destroy the old pixmap before
> > allocating the new one. This reduces pressure on the allocator, and
> > also eliminates some overdraw (compCopyWindow would copy in the bits
> > from the old pixmap regardless of gravity, even though they're about to
> > be blown away by the background tile described above).
>
> Sadly, 'Forget' only includes window resize, and not border size
> changes.
[censored] borders. True enough. Okay, so we can still take this
shortcut if either:
a) pixmap is resizing but border width has not changed
b) pixmap is not resizing but border width has changed
since in those cases the window is resizing and Forget rules apply.
(And, in both of those cases, we can also skip the CopyArea bit of
compNewPixmap() if the window background is non-None, since the
Forget-generated bg tile will clobber that work anyway. Separate
optimization at any rate.)
I guess then the other problem is handling non-Forget subwindows?
Technically we're allowed to treat any window like Forget so it's
_legal_ to blow away subwindow content in those cases, but we'd need to
signal that up to the caller so we know to generate exposes for bits
dropped down the memory hole.
Sound right?
- ajax
More information about the xorg-devel
mailing list