From: Eduard H. <eha...@gm...> - 2011-09-28 21:29:45
|
Here is some further thought about the pixmap handling. What I somehow dislike is the "dirty" handling of pixmaps when the client is closed. How about pre-allocating the pixmaps at driver startup: void wcmLedInitPixmap(WacomDevicePtr priv, int *values, int count) { int i; ScreenPtr pScreen = screenInfo.screens[0]; for (i = 0; i < count; i++) { PixmapPtr pMap; XID id; pMap = pScreen->CreatePixmap(pScreen, 64, 32, pScreen->rootDepth, 0); id = FakeClientID(0); pMap->drawable.id = id; AddResource(id, RT_PIXMAP, pMap); values[i] = id; } } or is this also too "hackish"? Eduard |