glx: Remove unused indirection for glx_context->fillImage
authorAdam Jackson <ajax@redhat.com>
Fri, 23 Aug 2019 16:51:08 +0000 (12:51 -0400)
committerAdam Jackson <ajax@redhat.com>
Thu, 12 Sep 2019 17:23:32 +0000 (13:23 -0400)
This slot is always filled in with __glFillImage.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glx/glxclient.h
src/glx/indirect_glx.c
src/glx/renderpix.c
src/mapi/glapi/gen/glX_proto_send.py

index 2a7437fcd1b4381669dfbea4da520a50e9446453..41edf17210f15d41cc7e55d28737ff20589dc6ca 100644 (file)
@@ -327,13 +327,6 @@ struct glx_context
    GLuint *selectBuf;
    /*@} */
 
    GLuint *selectBuf;
    /*@} */
 
-    /**
-     * Fill newImage with the unpacked form of \c oldImage getting it
-     * ready for transport to the server.
-     */
-   void (*fillImage) (struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
-                      GLenum, const GLvoid *, GLubyte *, GLubyte *);
-
     /**
      * Client side attribs.
      */
     /**
      * Client side attribs.
      */
index cfae12f6c0d515d8d10433d09ed335a077626f18..d4a0b640ada5f1920d89ab5dc43e8b7eda4188cd 100644 (file)
@@ -399,10 +399,6 @@ indirect_create_context(struct glx_screen *psc,
 
    gc->attributes.stackPointer = &gc->attributes.stack[0];
 
 
    gc->attributes.stackPointer = &gc->attributes.stack[0];
 
-   /*
-    ** PERFORMANCE NOTE: A mode dependent fill image can speed things up.
-    */
-   gc->fillImage = __glFillImage;
    gc->pc = gc->buf;
    gc->bufEnd = gc->buf + bufSize;
    gc->isDirect = GL_FALSE;
    gc->pc = gc->buf;
    gc->bufEnd = gc->buf + bufSize;
    gc->isDirect = GL_FALSE;
index a88b544c7647325fa9c9578ca716bd662c53f2b4..e367a9349c588e1d0cfeeca6eeb483236d616f39 100644 (file)
@@ -92,8 +92,8 @@ __glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim,
 
     /* Apply pixel store unpack modes to copy data into buf */
     if (src != NULL) {
 
     /* Apply pixel store unpack modes to copy data into buf */
     if (src != NULL) {
-       (*gc->fillImage) (gc, dim, width, height, depth, format, type,
-                         src, buf, modes);
+       __glFillImage(gc, dim, width, height, depth, format, type,
+                      src, buf, modes);
     }
     else {
        if (dim < 3) {
     }
     else {
        if (dim < 3) {
@@ -147,13 +147,12 @@ __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat,
       __GLX_PUT_LONG(20, type);
       pc += hdrlen;
       if (compsize > 0) {
       __GLX_PUT_LONG(20, type);
       pc += hdrlen;
       if (compsize > 0) {
-         (*gc->fillImage) (gc, 1, width, 1, 1, format, type,
-                           row, pc, pixelHeaderPC);
+         __glFillImage(gc, 1, width, 1, 1, format, type, row, pc,
+                       pixelHeaderPC);
          pc += image1len;
       }
       if (compsize2 > 0) {
          pc += image1len;
       }
       if (compsize2 > 0) {
-         (*gc->fillImage) (gc, 1, height, 1, 1, format, type,
-                           column, pc, NULL);
+         __glFillImage(gc, 1, height, 1, 1, format, type, column, pc, NULL);
          pc += image2len;
       }
       if ((compsize == 0) && (compsize2 == 0)) {
          pc += image2len;
       }
       if ((compsize == 0) && (compsize2 == 0)) {
@@ -183,11 +182,11 @@ __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat,
          __glXSetError(gc, GL_OUT_OF_MEMORY);
          return;
       }
          __glXSetError(gc, GL_OUT_OF_MEMORY);
          return;
       }
-      (*gc->fillImage) (gc, 1, width, 1, 1, format, type, row, buf,
-                        pixelHeaderPC);
+      __glFillImage(gc, 1, width, 1, 1, format, type, row, buf,
+                    pixelHeaderPC);
 
 
-      (*gc->fillImage) (gc, 1, height, 1, 1, format, type, column,
-                        buf + image1len, pixelHeaderPC);
+      __glFillImage(gc, 1, height, 1, 1, format, type, column,
+                    buf + image1len, pixelHeaderPC);
 
       /* Send large command */
       __glXSendLargeCommand(gc, gc->pc, (GLint) (pc - gc->pc), buf,
 
       /* Send large command */
       __glXSendLargeCommand(gc, gc->pc, (GLint) (pc - gc->pc), buf,
index 03067d8a3cd9576cafe53dafb064a3c3ea1a02cc..a269ff2068d412c9190dee6993e067d37fd556c7 100644 (file)
@@ -573,7 +573,7 @@ generic_%u_byte( GLint rop, const void * ptr )
                         condition = 'compsize > 0'
 
                     print('if (%s) {' % (condition))
                         condition = 'compsize > 0'
 
                     print('if (%s) {' % (condition))
-                    print('    gc->fillImage(gc, %s, %s, %s, %s, %s, %s, %s, %s, %s);' % (dim_str, width, height, depth, param.img_format, param.img_type, param.name, pcPtr, pixHeaderPtr))
+                    print('    __glFillImage(gc, %s, %s, %s, %s, %s, %s, %s, %s, %s);' % (dim_str, width, height, depth, param.img_format, param.img_type, param.name, pcPtr, pixHeaderPtr))
                     print('} else {')
                     print('    (void) memcpy( %s, default_pixel_store_%uD, default_pixel_store_%uD_size );' % (pixHeaderPtr, dim, dim))
                     print('}')
                     print('} else {')
                     print('    (void) memcpy( %s, default_pixel_store_%uD, default_pixel_store_%uD_size );' % (pixHeaderPtr, dim, dim))
                     print('}')