- if (all) {
- GLuint *ptr4 = (GLuint *) xrb->ximage->data;
- if ((pixel & 0xff) == ((pixel >> 8) & 0xff)) {
- /* low and high bytes are equal so use memset() */
- const GLuint n = xrb->ximage->bytes_per_line * xrb->Base.Height;
- MEMSET( ptr4, pixel & 0xff, n );
- }
- else {
- const GLuint n = xrb->ximage->bytes_per_line * xrb->Base.Height / 4;
- GLuint i;
- pixel = pixel | (pixel<<16);
- for (i = 0; i < n; i++) {
- ptr4[i] = pixel;
- }
- ptr4 += n;
- /* might be one last GLushort to set */
- if ((xrb->ximage->bytes_per_line * xrb->Base.Height) & 0x2)
- *(GLushort *)ptr4 = pixel & 0xffff;
- }
- }
- else {
- GLint i, j;
- for (j=0;j<height;j++) {
- GLushort *ptr2 = PIXEL_ADDR2(xrb, x, y + j);
- for (i=0;i<width;i++) {
- *ptr2++ = pixel;
- }
+ for (j = 0; j < height; j++) {
+ GLushort *ptr2 = PIXEL_ADDR2(xrb, x, y + j);
+ for (i = 0; i < width; i++) {
+ ptr2[i] = pixel;