swrast: remove unused _swrast_put_row()
This commit is contained in:
@@ -1436,41 +1436,6 @@ _swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper for gl_renderbuffer::PutRow() which does clipping.
|
|
||||||
* \param valueSize size of each value (pixel) in bytes
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|
||||||
GLuint count, GLint x, GLint y,
|
|
||||||
const GLvoid *values, GLuint valueSize)
|
|
||||||
{
|
|
||||||
GLint skip = 0;
|
|
||||||
|
|
||||||
if (y < 0 || y >= (GLint) rb->Height)
|
|
||||||
return; /* above or below */
|
|
||||||
|
|
||||||
if (x + (GLint) count <= 0 || x >= (GLint) rb->Width)
|
|
||||||
return; /* entirely left or right */
|
|
||||||
|
|
||||||
if ((GLint) (x + count) > (GLint) rb->Width) {
|
|
||||||
/* right clip */
|
|
||||||
GLint clip = x + count - rb->Width;
|
|
||||||
count -= clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (x < 0) {
|
|
||||||
/* left clip */
|
|
||||||
skip = -x;
|
|
||||||
x = 0;
|
|
||||||
count -= skip;
|
|
||||||
}
|
|
||||||
|
|
||||||
rb->PutRow(ctx, rb, count, x, y,
|
|
||||||
(const GLubyte *) values + skip * valueSize, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for gl_renderbuffer::GetRow() which does clipping.
|
* Wrapper for gl_renderbuffer::GetRow() which does clipping.
|
||||||
* \param valueSize size of each value (pixel) in bytes
|
* \param valueSize size of each value (pixel) in bytes
|
||||||
|
@@ -208,11 +208,6 @@ _swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|||||||
GLuint count, const GLint x[], const GLint y[],
|
GLuint count, const GLint x[], const GLint y[],
|
||||||
void *values, GLuint valueSize);
|
void *values, GLuint valueSize);
|
||||||
|
|
||||||
extern void
|
|
||||||
_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|
||||||
GLuint count, GLint x, GLint y,
|
|
||||||
const GLvoid *values, GLuint valueSize);
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
||||||
GLuint count, GLint x, GLint y,
|
GLuint count, GLint x, GLint y,
|
||||||
|
Reference in New Issue
Block a user