[PATCH xserver 4/8] xf86cmap: Always recalculate colors
Adam Jackson
ajax at redhat.com
Wed Jan 31 15:54:00 UTC 2018
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/xfree86/common/xf86cmap.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 93c38a692..a01d02cb3 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -96,7 +96,6 @@ typedef struct {
typedef struct {
LOCO *colors;
- Bool recalculate;
} CMapColormapRec, *CMapColormapPtr;
static DevPrivateKeyRec CMapScreenKeyRec;
@@ -295,7 +294,6 @@ CMapAllocateColormapPrivate(ColormapPtr pmap)
dixSetPrivate(&pmap->devPrivates, CMapColormapKey, pColPriv);
pColPriv->colors = colors;
- pColPriv->recalculate = TRUE;
/* add map to list */
pLink = malloc(sizeof(CMapLink));
@@ -522,8 +520,6 @@ static void
CMapReinstallMap(ColormapPtr pmap)
{
CMapScreenPtr pScreenPriv = getCMapScreenPtr(pmap->pScreen);
- CMapColormapPtr cmapPriv = getCMapColormapPtr(pmap);
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pmap->pScreen);
int i, n;
int *indices = pScreenPriv->PreAllocIndices;
@@ -532,13 +528,7 @@ CMapReinstallMap(ColormapPtr pmap)
while (i--)
indices[i] = i;
- if (cmapPriv->recalculate)
- CMapRefreshColors(pmap, n, indices);
- else {
- pScrn->LoadPalette(pScrn, n, indices, cmapPriv->colors, pmap->pVisual);
- }
-
- cmapPriv->recalculate = FALSE;
+ CMapRefreshColors(pmap, n, indices);
}
static void
@@ -731,7 +721,6 @@ CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma)
{
int ret = Success;
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
- CMapColormapPtr pColPriv;
CMapScreenPtr pScreenPriv;
CMapLinkPtr pLink;
@@ -756,8 +745,6 @@ CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma)
/* mark all colormaps on this screen */
pLink = pScreenPriv->maps;
while (pLink) {
- pColPriv = getCMapColormapPtr(pLink->cmap);
- pColPriv->recalculate = TRUE;
pLink = pLink->next;
}
@@ -824,7 +811,6 @@ xf86ChangeGammaRamp(ScreenPtr pScreen,
unsigned short *green, unsigned short *blue)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- CMapColormapPtr pColPriv;
CMapScreenPtr pScreenPriv;
CMapLinkPtr pLink;
@@ -842,8 +828,6 @@ xf86ChangeGammaRamp(ScreenPtr pScreen,
/* mark all colormaps on this screen */
pLink = pScreenPriv->maps;
while (pLink) {
- pColPriv = getCMapColormapPtr(pLink->cmap);
- pColPriv->recalculate = TRUE;
pLink = pLink->next;
}
--
2.14.3
More information about the xorg-devel
mailing list