Removed unnecessary optimization that forces extra memcpy() for textures with width not multiplier of 2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user