src/render/opengles2/SDL_render_gles2.c
changeset 5214 b0797947dd1c
parent 5213 25ad4a50d34f
child 5222 c66b2a778b7e
--- a/src/render/opengles2/SDL_render_gles2.c	Sun Feb 06 19:12:55 2011 -0800
+++ b/src/render/opengles2/SDL_render_gles2.c	Sun Feb 06 20:56:21 2011 -0800
@@ -389,35 +389,13 @@
                     tdata->pixel_format,
                     tdata->pixel_type,
                     src);
+    SDL_free(blob);
+
     if (glGetError() != GL_NO_ERROR)
     {
         SDL_SetError("Failed to update texture");
         return -1;
     }
-
-    /* Update the (streaming) texture buffer, in one pass if possible */
-    if (tdata->pixel_data)
-    {
-        dest = (Uint8 *)tdata->pixel_data +
-               (tdata->pitch * rect->y) +
-               (SDL_BYTESPERPIXEL(texture->format) * rect->x);
-        if (rect->w == texture->w)
-        {
-            SDL_memcpy(dest, src, srcPitch * rect->h);
-        }
-        else
-        {
-            for (y = 0; y < rect->h; ++y)
-            {
-                SDL_memcpy(dest, src, srcPitch);
-                src += srcPitch;
-                dest += tdata->pitch;
-            }
-        }
-    }
-
-    /* Clean up and return */
-    SDL_free(blob);
     return 0;
 }