[PATCH] composite: Optimize resizes of ForgetGravity windows

Keith Packard keithp at keithp.com
Mon Jul 28 13:04:47 PDT 2014


Adam Jackson <ajax at redhat.com> writes:

> Per the spec:
>
>     A bit-gravity of Forget indicates that the window contents are
>     always discarded after a size change, even if backing-store or
>     save-under has been requested. The window is tiled with its
>     background (except, if no background is defined, the existing
>     screen contents are not altered) and zero or more exposure events
>     are generated.
>
> 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.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140728/e6b6ca78/attachment.sig>


More information about the xorg-devel mailing list