diff options
author | Jeremy Huddleston <[email protected]> | 2010-04-01 17:00:22 -0700 |
---|---|---|
committer | Jeremy Huddleston <[email protected]> | 2010-04-01 17:01:51 -0700 |
commit | 115203281cf791221f586f03c14cfe4e0a44dd7a (patch) | |
tree | 767951e542d416243041b964dd252e030cfadf5e /src/glx/apple/glxreply.c | |
parent | 9aadc793f3db64cefa0b08f18abad424a659dacc (diff) |
Revert accidental commits from the xquartz tree
This reverts commit 9aadc793f3db64cefa0b08f18abad424a659dacc.
This reverts commit 69ea4e7718efb60b6b0d795a355cebd6712ceac1.
This reverts commit dbe8b013936d977ec63d6607bfd2fc6772d29787.
This reverts commit 23215ef4d60a86d9f3b3fdc08e3fdadc59e98890.
This reverts commit 9495e3703062d1ddaf3161f4efc23f0b51284d9b.
This reverts commit 0594cf70883b64692ba617d85f4f9b4e636e5c2b.
This reverts commit 86a7978d37393ee34f876569ac06ffdb8d7289ae.
This reverts commit 437902ce978cde9a0e1aa260f12dc232a8501c42.
Diffstat (limited to 'src/glx/apple/glxreply.c')
-rw-r--r-- | src/glx/apple/glxreply.c | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/src/glx/apple/glxreply.c b/src/glx/apple/glxreply.c deleted file mode 100644 index 7280bc9715a..00000000000 --- a/src/glx/apple/glxreply.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * (C) Copyright Apple Inc. 2008 - * (C) Copyright IBM Corporation 2004, 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include <GL/gl.h> -#include "glxclient.h" -#include <GL/glxproto.h> - -CARD32 -__glXReadReply(Display * dpy, size_t size, void *dest, - GLboolean reply_is_always_array) -{ - xGLXSingleReply reply; - - (void) _XReply(dpy, (xReply *) & reply, 0, False); - if (size != 0) { - if ((reply.length > 0) || reply_is_always_array) { - const GLint bytes = (reply_is_always_array) - ? (4 * reply.length) : (reply.size * size); - const GLint extra = 4 - (bytes & 3); - - _XRead(dpy, dest, bytes); - if (extra < 4) { - _XEatData(dpy, extra); - } - } - else { - (void) memcpy(dest, &(reply.pad3), size); - } - } - - return reply.retval; -} - -void -__glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim, - GLint width, GLint height, GLint depth, GLenum format, - GLenum type, void *dest, GLboolean dimensions_in_reply) -{ - xGLXSingleReply reply; - GLint size; - - (void) _XReply(dpy, (xReply *) & reply, 0, False); - - if (dimensions_in_reply) { - width = reply.pad3; - height = reply.pad4; - depth = reply.pad5; - - if ((height == 0) || (max_dim < 2)) { - height = 1; - } - if ((depth == 0) || (max_dim < 3)) { - depth = 1; - } - } - - size = reply.length * 4; - if (size != 0) { - void *buf = Xmalloc(size); - - if (buf == NULL) { - _XEatData(dpy, size); - __glXSetError(gc, GL_OUT_OF_MEMORY); - } - else { - const GLint extra = 4 - (size & 3); - - _XRead(dpy, buf, size); - if (extra < 4) { - _XEatData(dpy, extra); - } - - __glEmptyImage(gc, 3, width, height, depth, format, type, buf, dest); - Xfree(buf); - } - } -} - -#if 0 -GLubyte * -__glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen) -{ - xGLXSingleReq *req; - Display *const dpy = gc->currentDpy; - - (void) __glXFlushRenderBuffer(gc, gc->pc); - LockDisplay(dpy); - GetReqExtra(GLXSingle, cmdlen, req); - req->reqType = gc->majorOpcode; - req->contextTag = gc->currentContextTag; - req->glxCode = sop; - return (GLubyte *) (req) + sz_xGLXSingleReq; -} -#endif - -GLubyte * -__glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop, - GLint cmdlen) -{ - xGLXVendorPrivateReq *req; - Display *const dpy = gc->currentDpy; - - (void) __glXFlushRenderBuffer(gc, gc->pc); - LockDisplay(dpy); - GetReqExtra(GLXVendorPrivate, cmdlen, req); - req->reqType = gc->majorOpcode; - req->glxCode = code; - req->vendorCode = vop; - req->contextTag = gc->currentContextTag; - return (GLubyte *) (req) + sz_xGLXVendorPrivateReq; -} |