Lines Matching full:gamma
90 LOCO *gamma; member
124 static int CMapChangeGamma(ScrnInfoPtr, Gamma);
154 LOCO *gamma; in xf86HandleColormaps() local
164 if (!(gamma = xallocarray(elements, sizeof(LOCO)))) in xf86HandleColormaps()
168 free(gamma); in xf86HandleColormaps()
173 free(gamma); in xf86HandleColormaps()
196 pScreenPriv->gamma = gamma; in xf86HandleColormaps()
566 LOCO *gamma, *colors; in CMapRefreshColors() local
573 gamma = pScreenPriv->gamma; in CMapRefreshColors()
584 colors[i].red = gamma[index].red; in CMapRefreshColors()
585 colors[i].green = gamma[index].green; in CMapRefreshColors()
586 colors[i].blue = gamma[index].blue; in CMapRefreshColors()
592 colors[i].red = gamma[i * maxValue / reds].red; in CMapRefreshColors()
594 colors[i].green = gamma[i * maxValue / greens].green; in CMapRefreshColors()
596 colors[i].blue = gamma[i * maxValue / blues].blue; in CMapRefreshColors()
600 colors[i].red = gamma[((i >> pVisual->offsetRed) & reds) * in CMapRefreshColors()
602 colors[i].green = gamma[((i >> pVisual->offsetGreen) & greens) * in CMapRefreshColors()
604 colors[i].blue = gamma[((i >> pVisual->offsetBlue) & blues) * in CMapRefreshColors()
617 gamma[entry->co.shco.red->color >> shift].red; in CMapRefreshColors()
619 gamma[entry->co.shco.green->color >> shift].green; in CMapRefreshColors()
621 gamma[entry->co.shco.blue->color >> shift].blue; in CMapRefreshColors()
624 colors[index].red = gamma[entry->co.local.red >> shift].red; in CMapRefreshColors()
626 gamma[entry->co.local.green >> shift].green; in CMapRefreshColors()
627 colors[index].blue = gamma[entry->co.local.blue >> shift].blue; in CMapRefreshColors()
637 gamma[pmap->red[index].co.local.red >> shift].red; in CMapRefreshColors()
640 gamma[pmap->green[index].co.local.green >> shift].green; in CMapRefreshColors()
643 gamma[pmap->blue[index].co.local.blue >> shift].blue; in CMapRefreshColors()
651 colors[index].red = gamma[pmap->red[(index >> pVisual-> in CMapRefreshColors()
655 gamma[pmap->green[(index >> pVisual->offsetGreen) & greens].co. in CMapRefreshColors()
658 gamma[pmap->blue[(index >> pVisual->offsetBlue) & blues].co. in CMapRefreshColors()
849 free(pScreenPriv->gamma); in CMapUnwrapScreen()
862 /* This check is to catch drivers that are not initialising pScrn->gamma */ in ComputeGamma()
863 if (pScrn->gamma.red < GAMMA_MIN || pScrn->gamma.red > GAMMA_MAX || in ComputeGamma()
864 pScrn->gamma.green < GAMMA_MIN || pScrn->gamma.green > GAMMA_MAX || in ComputeGamma()
865 pScrn->gamma.blue < GAMMA_MIN || pScrn->gamma.blue > GAMMA_MAX) { in ComputeGamma()
869 "\tthe gamma values.\n", pScrn->driverName); in ComputeGamma()
873 pScrn->gamma.red = 1.0; in ComputeGamma()
874 pScrn->gamma.green = 1.0; in ComputeGamma()
875 pScrn->gamma.blue = 1.0; in ComputeGamma()
879 RedGamma = 1.0 / (double) pScrn->gamma.red; in ComputeGamma()
880 GreenGamma = 1.0 / (double) pScrn->gamma.green; in ComputeGamma()
881 BlueGamma = 1.0 / (double) pScrn->gamma.blue; in ComputeGamma()
885 priv->gamma[i].red = i; in ComputeGamma()
887 priv->gamma[i].red = (CARD16) (pow((double) i / (double) elements, in ComputeGamma()
892 priv->gamma[i].green = i; in ComputeGamma()
894 priv->gamma[i].green = (CARD16) (pow((double) i / (double) elements, in ComputeGamma()
899 priv->gamma[i].blue = i; in ComputeGamma()
901 priv->gamma[i].blue = (CARD16) (pow((double) i / (double) elements, in ComputeGamma()
908 CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma) in CMapChangeGamma() argument
925 if (gamma.red < GAMMA_MIN || gamma.red > GAMMA_MAX || in CMapChangeGamma()
926 gamma.green < GAMMA_MIN || gamma.green > GAMMA_MAX || in CMapChangeGamma()
927 gamma.blue < GAMMA_MIN || gamma.blue > GAMMA_MAX) in CMapChangeGamma()
930 pScrn->gamma.red = gamma.red; in CMapChangeGamma()
931 pScrn->gamma.green = gamma.green; in CMapChangeGamma()
932 pScrn->gamma.blue = gamma.blue; in CMapChangeGamma()
955 for another map to change the gamma on. */ in CMapChangeGamma()
978 ret = pScrn->ChangeGamma(pScrn, gamma); in CMapChangeGamma()
990 LOCO *entry = priv->gamma; in ComputeGammaRamp()
1044 for another map to change the gamma on. */ in xf86ChangeGammaRamp()
1105 entry = pScreenPriv->gamma; in xf86GetGammaRamp()
1129 xf86ChangeGamma(ScreenPtr pScreen, Gamma gamma) in xf86ChangeGamma() argument
1134 return (*pScrn->ChangeGamma) (pScrn, gamma); in xf86ChangeGamma()