OSDN Git Service

mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.
[android-x86/external-mesa.git] / src / mesa / swrast / s_drawpix.c
index 1fa64c3..0bfa475 100644 (file)
@@ -17,7 +17,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
@@ -267,7 +267,7 @@ draw_stencil_pixels( struct gl_context *ctx, GLint x, GLint y,
    GLint row;
    GLubyte *values;
 
-   values = (GLubyte *) malloc(width * sizeof(GLubyte));
+   values = malloc(width * sizeof(GLubyte));
    if (!values) {
       _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels");
       return;
@@ -429,7 +429,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
    INIT_SPAN(span, GL_BITMAP);
    _swrast_span_default_attribs(ctx, &span);
    span.arrayMask = SPAN_RGBA;
-   span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */
+   span.arrayAttribs = VARYING_BIT_COL0; /* we're fill in COL0 attrib values */
 
    if (ctx->DrawBuffer->_NumColorDrawBuffers > 0) {
       GLenum datatype = _mesa_get_format_datatype(
@@ -451,7 +451,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
          = _mesa_image_row_stride(unpack, width, format, type);
       GLint skipPixels = 0;
       /* use span array for temp color storage */
-      GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0];
+      GLfloat *rgba = (GLfloat *) span.array->attribs[VARYING_SLOT_COL0];
 
       /* if the span is wider than SWRAST_MAX_WIDTH we have to do it in chunks */
       while (skipPixels < width) {
@@ -493,9 +493,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
       span.array->ChanType = CHAN_TYPE;
    }
 
-   if (convImage) {
-      free(convImage);
-   }
+   free(convImage);
 
    swrast_render_finish(ctx);
 }
@@ -592,7 +590,7 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
       GLuint *zValues;  /* 32-bit Z values */
       GLint i;
 
-      zValues = (GLuint *) malloc(width * sizeof(GLuint));
+      zValues = malloc(width * sizeof(GLuint));
       if (!zValues) {
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels");
          return;