diff src/video/SDL_video.c @ 5141:da10636e5eca

Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 31 Jan 2011 22:44:43 -0800
parents dc0dfdd58f27
children e743b9c3f6d6
line wrap: on
line diff
--- a/src/video/SDL_video.c	Mon Jan 31 22:21:29 2011 -0800
+++ b/src/video/SDL_video.c	Mon Jan 31 22:44:43 2011 -0800
@@ -1961,7 +1961,6 @@
     {
         Uint8 r, g, b, a;
         SDL_BlendMode blendMode;
-        SDL_ScaleMode scaleMode;
 
         SDL_GetSurfaceColorMod(surface, &r, &g, &b);
         SDL_SetTextureColorMod(texture, r, g, b);
@@ -1976,9 +1975,6 @@
             SDL_GetSurfaceBlendMode(surface, &blendMode);
             SDL_SetTextureBlendMode(texture, blendMode);
         }
-
-        SDL_GetSurfaceScaleMode(surface, &scaleMode);
-        SDL_SetTextureScaleMode(texture, scaleMode);
     }
 
     if (SDL_ISPIXELFORMAT_INDEXED(format) && fmt->palette) {
@@ -2162,33 +2158,6 @@
 }
 
 int
-SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)
-{
-    SDL_Renderer *renderer;
-
-    CHECK_TEXTURE_MAGIC(texture, -1);
-
-    renderer = texture->renderer;
-    if (!renderer->SetTextureScaleMode) {
-        SDL_Unsupported();
-        return -1;
-    }
-    texture->scaleMode = scaleMode;
-    return renderer->SetTextureScaleMode(renderer, texture);
-}
-
-int
-SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode)
-{
-    CHECK_TEXTURE_MAGIC(texture, -1);
-
-    if (scaleMode) {
-        *scaleMode = texture->scaleMode;
-    }
-    return 0;
-}
-
-int
 SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect,
                   const void *pixels, int pitch)
 {