Revision: 155 http://trac.macosforge.org/projects/xquartz/changeset/155 Author: gstaplin@apple.com Date: 2009-02-16 15:56:05 -0800 (Mon, 16 Feb 2009) Log Message: ----------- Extend the apple pixmap API to support pitch and bytes per pixel (bpp). Modified Paths: -------------- AppleSGLX/trunk/apple_glx_pixmap.c AppleSGLX/trunk/apple_glx_pixmap.h Modified: AppleSGLX/trunk/apple_glx_pixmap.c =================================================================== --- AppleSGLX/trunk/apple_glx_pixmap.c 2009-02-16 23:46:31 UTC (rev 154) +++ AppleSGLX/trunk/apple_glx_pixmap.c 2009-02-16 23:56:05 UTC (rev 155) @@ -183,7 +183,7 @@ } bool apple_glx_pixmap_data(Display *dpy, GLXPixmap pixmap, int *width, - int *height, void **ptr) { + int *height, int *pitch, int *bpp, void **ptr) { struct apple_glx_pixmap *p; bool result = false; @@ -192,6 +192,8 @@ if(find_pixmap(pixmap, &p)) { *width = p->width; *height = p->height; + *pitch = p->pitch; + *bpp = p->bpp; *ptr = p->buffer; result = true; } @@ -200,4 +202,3 @@ return result; } - Modified: AppleSGLX/trunk/apple_glx_pixmap.h =================================================================== --- AppleSGLX/trunk/apple_glx_pixmap.h 2009-02-16 23:46:31 UTC (rev 154) +++ AppleSGLX/trunk/apple_glx_pixmap.h 2009-02-16 23:56:05 UTC (rev 155) @@ -42,6 +42,6 @@ /* Returns true if the pixmap is valid, and there is data for it. */ bool apple_glx_pixmap_data(Display *dpy, GLXPixmap pixmap, int *width, - int *height, void **ptr); + int *height, int *pitch, int *bpp, void **ptr); #endif
participants (1)
-
source_changes@macosforge.org