for (int i = 0; i < 1024; i++) { final int v = argb[i]; final int a = (v >>> 24) & 0xFF; final int r = ((v >> 16) & 0xFF) >> 3; final int g = ((v >> 8) & 0xFF) >> 3; final int b = (v & 0xFF) >> 3;
for (int row = 0; row < h; row++) { final int imgOfs = row * w; final int resOfs = row * 16;  for (int x = 0; x < w; x++) { final int resRowIdx = resOfs + (((64 - w) + x) >> 3); final int resRowBit = 1 << (7 - (((64 - w) + x) & 7));
    private short[] getCursor(HardwareCursor cursor) {		final HardwareCursorImage img = cursor.getImage(32, 32);		if (img == null) {			return null;		}		short[] res = (short[]) cursorCache.get(img);		if (res == null) {			res = new short[1024];			final int[] argb = img.getImage();			for (int i = 0; i < 1024; i++) {				final int v = argb[i];				final int a = (v >>> 24) & 0xFF;				final int r = ((v >> 16) & 0xFF) >> 3;				final int g = ((v >> 8) & 0xFF) >> 3;				final int b = (v & 0xFF) >> 3;				res[i] = (short) ((r << 10) | (g << 5) | b);				if (a != 0) {					res[i] |= 0x8000;				}			}			cursorCache.put(img, res);		}		return res;	}