glx: Remove unused indirection for glx_context->fillImage

This slot is always filled in with __glFillImage.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Adam Jackson
2019-08-23 12:51:08 -04:00
parent f812cbfd88
commit ad9c1838e0
4 changed files with 10 additions and 22 deletions

View 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.
*/ */

View 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->pc = gc->buf;
gc->bufEnd = gc->buf + bufSize; gc->bufEnd = gc->buf + bufSize;
gc->isDirect = GL_FALSE; gc->isDirect = GL_FALSE;

View File

@@ -92,7 +92,7 @@ __glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim,
/* Apply pixel store unpack modes to copy data into buf */ /* Apply pixel store unpack modes to copy data into buf */
if (src != NULL) { if (src != NULL) {
(*gc->fillImage) (gc, dim, width, height, depth, format, type, __glFillImage(gc, dim, width, height, depth, format, type,
src, buf, modes); src, buf, modes);
} }
else { else {
@@ -147,13 +147,12 @@ __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat,
__GLX_PUT_LONG(20, type); __GLX_PUT_LONG(20, type);
pc += hdrlen; pc += hdrlen;
if (compsize > 0) { if (compsize > 0) {
(*gc->fillImage) (gc, 1, width, 1, 1, format, type, __glFillImage(gc, 1, width, 1, 1, format, type, row, pc,
row, pc, pixelHeaderPC); pixelHeaderPC);
pc += image1len; pc += image1len;
} }
if (compsize2 > 0) { if (compsize2 > 0) {
(*gc->fillImage) (gc, 1, height, 1, 1, format, type, __glFillImage(gc, 1, height, 1, 1, format, type, column, pc, NULL);
column, pc, NULL);
pc += image2len; pc += image2len;
} }
if ((compsize == 0) && (compsize2 == 0)) { if ((compsize == 0) && (compsize2 == 0)) {
@@ -183,10 +182,10 @@ __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat,
__glXSetError(gc, GL_OUT_OF_MEMORY); __glXSetError(gc, GL_OUT_OF_MEMORY);
return; return;
} }
(*gc->fillImage) (gc, 1, width, 1, 1, format, type, row, buf, __glFillImage(gc, 1, width, 1, 1, format, type, row, buf,
pixelHeaderPC); pixelHeaderPC);
(*gc->fillImage) (gc, 1, height, 1, 1, format, type, column, __glFillImage(gc, 1, height, 1, 1, format, type, column,
buf + image1len, pixelHeaderPC); buf + image1len, pixelHeaderPC);
/* Send large command */ /* Send large command */

View File

@@ -573,7 +573,7 @@ generic_%u_byte( GLint rop, const void * ptr )
condition = 'compsize > 0' condition = 'compsize > 0'
print('if (%s) {' % (condition)) 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('} else {')
print(' (void) memcpy( %s, default_pixel_store_%uD, default_pixel_store_%uD_size );' % (pixHeaderPtr, dim, dim)) print(' (void) memcpy( %s, default_pixel_store_%uD, default_pixel_store_%uD_size );' % (pixHeaderPtr, dim, dim))
print('}') print('}')