summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/pixel.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-01-07 02:39:09 +0000
committerIan Romanick <[email protected]>2005-01-07 02:39:09 +0000
commit5f1f229f8da255ca9b390da1757ad781978cf619 (patch)
tree14a550730dc7a2ceb74ef84183b518460d2e1b68 /src/glx/x11/pixel.c
parent3385d7cec3308129f6f1fc5990023417e4e4be47 (diff)
Pixel oriented render functions are now generated by the
glX_proto_send.py script. This eliminates ~600 lines of non-generated code. With proper compiler optimization settings, it also decreases the size of libGL.so by about 3KB.
Diffstat (limited to 'src/glx/x11/pixel.c')
-rw-r--r--src/glx/x11/pixel.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/src/glx/x11/pixel.c b/src/glx/x11/pixel.c
index 75960e40f55..3b3a1811abb 100644
--- a/src/glx/x11/pixel.c
+++ b/src/glx/x11/pixel.c
@@ -249,31 +249,12 @@ void __glFillImage(__GLXcontext *gc, GLint dim, GLint width, GLint height,
/* Setup store modes that describe what we just did */
if (modes) {
- if (dim == 3) {
- GLubyte *pc = modes;
- __GLX_PUT_CHAR(0,GL_FALSE);
- __GLX_PUT_CHAR(1,GL_FALSE);
- __GLX_PUT_CHAR(2,0);
- __GLX_PUT_CHAR(3,0);
- __GLX_PUT_LONG(4,0);
- __GLX_PUT_LONG(8,0);
- __GLX_PUT_LONG(12,0);
- __GLX_PUT_LONG(16,0);
- __GLX_PUT_LONG(20,0);
- __GLX_PUT_LONG(24,0);
- __GLX_PUT_LONG(28,0);
- __GLX_PUT_LONG(32,1);
- } else {
- GLubyte *pc = modes;
- __GLX_PUT_CHAR(0,GL_FALSE);
- __GLX_PUT_CHAR(1,GL_FALSE);
- __GLX_PUT_CHAR(2,0);
- __GLX_PUT_CHAR(3,0);
- __GLX_PUT_LONG(4,0);
- __GLX_PUT_LONG(8,0);
- __GLX_PUT_LONG(12,0);
- __GLX_PUT_LONG(16,1);
- }
+ if ( dim < 3 ) {
+ (void) memcpy( modes, __glXDefaultPixelStore + 4, 20 );
+ }
+ else {
+ (void) memcpy( modes, __glXDefaultPixelStore + 0, 36 );
+ }
}
}