[PATCH 2/2] exa/mixed: Exclude frontbuffer from deferred pixmap handling.
Maarten Maathuis
madman2003 at gmail.com
Thu Dec 9 12:19:25 PST 2010
These patches have only been tested against 1.9.2.901, not master.
On Thu, Dec 9, 2010 at 9:17 PM, Maarten Maathuis <madman2003 at gmail.com> wrote:
> - Apps like xterm can trigger a lot of fallback rendering.
> - This can lead to (annoyingly) high latencies, because you
> have to wait for the block handler.
>
> Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
> ---
> exa/exa_migration_mixed.c | 17 +++++++++++++----
> 1 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
> index fb47151..4f49905 100644
> --- a/exa/exa_migration_mixed.c
> +++ b/exa/exa_migration_mixed.c
> @@ -138,6 +138,7 @@ void
> exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure)
> {
> PixmapPtr pPixmap = closure;
> + ScreenPtr pScreen = pPixmap->drawable.pScreen;
> ExaPixmapPriv(pPixmap);
>
> /* Move back results of software rendering on system memory copy of mixed driver
> @@ -149,10 +150,18 @@ exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure)
> if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) {
> ExaScreenPriv(pPixmap->drawable.pScreen);
>
> - if (pExaScr->deferred_mixed_pixmap &&
> - pExaScr->deferred_mixed_pixmap != pPixmap)
> - exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
> - pExaScr->deferred_mixed_pixmap = pPixmap;
> + /* Front buffer: Don't wait for the block handler to copy back the data.
> + * This avoids annoying latency if you encounter a lot of software rendering.
> + */
> + if (pPixmap == pScreen->GetScreenPixmap(pScreen))
> + exaMoveInPixmap_mixed(pPixmap);
> + else {
> + if (pExaScr->deferred_mixed_pixmap &&
> + pExaScr->deferred_mixed_pixmap != pPixmap)
> + exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
> +
> + pExaScr->deferred_mixed_pixmap = pPixmap;
> + }
> }
> }
>
> --
> 1.7.3.2
>
>
--
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.
More information about the xorg-devel
mailing list