DUMMYAdjustFrame does nothing useful

Antoine Martin antoine at nagafix.co.uk
Fri Sep 16 09:58:54 UTC 2016


Hi,

This function does absolutely nothing except dereferencing some
pointers. Can we get rid of it? (or just replace it with a no-op)
What is it meant to do?

Here it is in full:
* Mandatory */
void
DUMMYAdjustFrame(ADJUST_FRAME_ARGS_DECL)
{
    SCRN_INFO_PTR(arg);
    int Base;

    Base = (y * pScrn->displayWidth + x) >> 2;

    /* Scale Base by the number of bytes per pixel. */
    switch (pScrn->depth) {
    case  8 :
        break;
    case 15 :
    case 16 :
        Base *= 2;
        break;
    case 24 :
        Base *= 3;
        break;
    case 30 :
        Base *= 4;
    default :
        break;
    }
}

Cheers
Antoine


More information about the xorg-devel mailing list