[PATCH] ephyr: Repaint entire screen when colormap is updated
Eric Anholt
eric at anholt.net
Thu Feb 6 14:19:20 PST 2014
Keith Packard <keithp at keithp.com> writes:
> Any time the colormap is changed, the entire screen needs to be
> repainted to match.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> hw/kdrive/ephyr/ephyr.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
> index da80c95..73d7b87 100644
> --- a/hw/kdrive/ephyr/ephyr.c
> +++ b/hw/kdrive/ephyr/ephyr.c
> @@ -1232,6 +1232,10 @@ ephyrGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs)
> void
> ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs)
> {
> + KdScreenPriv(pScreen);
> + KdScreenInfo *screen = pScreenPriv->screen;
> + EphyrScrPriv *scrpriv = screen->driver;
> + BoxRec box;
> int min, max, p;
>
> /* XXX Not sure if this is right */
> @@ -1251,6 +1255,13 @@ ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs)
> pdefs->green >> 8, pdefs->blue >> 8);
> pdefs++;
> }
> + if (scrpriv->pDamage) {
> + box.x1 = 0;
> + box.y1 = 0;
> + box.x2 = pScreen->width;
> + box.y2 = pScreen->height;
> + RegionReset(DamageRegion(scrpriv->pDamage), &box);
> + }
> }
I expected DamageReportDamage() to be used instead, but this is safe
because we're using DamageReportNone (and leaving the blockhandler to do
our paint).
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140206/0795fa22/attachment.pgp>
More information about the xorg-devel
mailing list