Removed unnecessary optimization that forces extra memcpy() for textures with width not multiplier of 2

This commit is contained in:
pelya
2010-07-29 12:22:08 +03:00
parent 0437552f65
commit 29088c7b98
3 changed files with 6 additions and 6 deletions

View File

@@ -306,9 +306,9 @@ Uint16 SDL_CalculatePitch(SDL_Surface *surface)
}
// 4-byte aligning adds extra memcpy() with OpenGL ES renderer
// TODO: check if we really can disable that for Android
//#ifndef ANDROID
#ifndef ANDROID
pitch = (pitch + 3) & ~3; /* 4-byte aligning */
//#endif
#endif
return(pitch);
}
/*

View File

@@ -597,7 +597,11 @@ SDL_CalculatePitch(SDL_Surface * surface)
default:
break;
}
// 4-byte aligning adds extra memcpy() with OpenGL ES renderer
// TODO: check if we really can disable that for Android
#ifndef ANDROID
pitch = (pitch + 3) & ~3; /* 4-byte aligning */
#endif
return (pitch);
}

View File

@@ -952,10 +952,6 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
/* this code is a little funny because the viewport is upside down vs SDL's coordinate system */
SDL_Window *window = renderer->window;
__android_log_print(ANDROID_LOG_INFO, "libSDL", "GLES_RenderCopy(): %dx%d+%d+%d -> %dx%d+%d+%d",
(int)srcrect->x, (int)srcrect->y, (int)srcrect->w, (int)srcrect->h,
(int)dstrect->x, (int)dstrect->y, (int)dstrect->w, (int)dstrect->h);
GLint cropRect[4];
cropRect[0] = srcrect->x;
cropRect[1] = srcrect->y + srcrect->h;