diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-08-24 22:43:27 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-08-24 22:43:27 +0000 |
commit | 55c5c6953a3a661758a42b147f9542950a62fc4d (patch) | |
tree | 7b0948f34c483e71d402d62196f6f69a47d01c76 /exa/exa.c | |
parent | 079ad773e09ed0c5baf01de3d4f02a5568da5634 (diff) |
Bugzilla #4090: Introduce getters for pixmap pitch and offset, to
simplify/clarify it for driver writers who probably don't want to know
what pPixmap->devPrivate.ptr or pPixmap->devKind mean. Converts the sis
driver to use them, and bumps the EXA module minor version.
Diffstat (limited to 'exa/exa.c')
-rw-r--r-- | exa/exa.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -58,6 +58,26 @@ int exaPixmapPrivateIndex; #define EXA_PIXMAP_SCORE_PINNED 1000 #define EXA_PIXMAP_SCORE_INIT 1001 +/* Returns the offset (in bytes) within the framebuffer of the beginning of the + * given pixmap. May need to be extended in the future if we grow support for + * having multiple card-accessible areas at different offsets. + */ +unsigned long +exaGetPixmapOffset(PixmapPtr pPix) +{ + ExaScreenPriv (pPix->drawable.pScreen); + + return ((unsigned long)pPix->devPrivate.ptr - + (unsigned long)pExaScr->info->card.memoryBase); +} + +/* Returns the pitch in bytes of the given pixmap. */ +unsigned long +exaGetPixmapPitch(PixmapPtr pPix) +{ + return pPix->devKind; +} + void exaDrawableDirty (DrawablePtr pDrawable) { |