Problem with exaModifyPixmapHeader_classic?

april aapril03 at gmail.com
Tue May 18 02:42:34 PDT 2010


Hi all:
 I found problems when using exaGetPixmapOffset to get the offset of
pixmap in framebuffer when this Pixmap is not within the EXA
offscreen.
 Because the pExaPixmap->fb_ptr is NULL.
In function exaModifyPixmapHeader_classic, pExaPixmap->fb_ptr is NULL
unless pixmap is in EXA Offscreen.

So can it be changed to the follow?
--------------------------------------------------------------------------------
	/* Classic EXA:
	 * - Framebuffer.
	 * - Scratch pixmap with offscreen memory.
	 */
	if (pExaScr->info->memoryBase && pPixData) {
-	    if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
-		((CARD8 *)pPixData - pExaScr->info->memoryBase) <
-				pExaScr->info->memorySize) {
+      if (exaPixmapIsOffscreen(pExaPixmap)) {
		pExaPixmap->fb_ptr = pPixData;
		pExaPixmap->fb_pitch = devKind;
		pExaPixmap->offscreen = TRUE;
	    }
	}
--------------------------------------------------------------------------
Thanks


More information about the xorg-devel mailing list