Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
authorSam Lantinga <slouken@libsdl.org>
Mon, 31 Jan 2011 22:44:43 -0800
changeset 5138da10636e5eca
parent 5137 e594f07297a9
child 5139 57851a238c8f
Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
Makefile.in
include/SDL_compat.h
include/SDL_scalemode.h
include/SDL_surface.h
include/SDL_video.h
src/video/SDL_renderer_gl.c
src/video/SDL_renderer_gles.c
src/video/SDL_renderer_sw.c
src/video/SDL_surface.c
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/directfb/SDL_DirectFB_render.c
src/video/nds/SDL_ndsrender.c
src/video/photon/SDL_photon_render.c
src/video/qnxgf/SDL_gf_render.c
src/video/windows/SDL_ceddrawrender.c
src/video/windows/SDL_d3drender.c
src/video/windows/SDL_gapirender.c
src/video/windows/SDL_windowsvideo.c
src/video/x11/SDL_x11video.c
test/common.c
test/testsprite2.c
     1.1 --- a/Makefile.in	Mon Jan 31 22:21:29 2011 -0800
     1.2 +++ b/Makefile.in	Mon Jan 31 22:44:43 2011 -0800
     1.3 @@ -71,7 +71,6 @@
     1.4  	SDL_rect.h \
     1.5  	SDL_revision.h \
     1.6  	SDL_rwops.h \
     1.7 -	SDL_scalemode.h \
     1.8  	SDL_scancode.h \
     1.9  	SDL_shape.h \
    1.10  	SDL_stdinc.h \
     2.1 --- a/include/SDL_compat.h	Mon Jan 31 22:21:29 2011 -0800
     2.2 +++ b/include/SDL_compat.h	Mon Jan 31 22:44:43 2011 -0800
     2.3 @@ -208,14 +208,6 @@
     2.4      SDL_GRAB_ON = 1
     2.5  } SDL_GrabMode;
     2.6  
     2.7 -typedef enum
     2.8 -{
     2.9 -    SDL_TEXTURESCALEMODE_NONE = SDL_SCALEMODE_NONE,
    2.10 -    SDL_TEXTURESCALEMODE_FAST = SDL_SCALEMODE_FAST,
    2.11 -    SDL_TEXTURESCALEMODE_SLOW = SDL_SCALEMODE_SLOW,
    2.12 -    SDL_TEXTURESCALEMODE_BEST = SDL_SCALEMODE_BEST
    2.13 -} SDL_TextureScaleMode;
    2.14 -
    2.15  struct SDL_SysWMinfo;
    2.16  
    2.17  /**
     3.1 --- a/include/SDL_scalemode.h	Mon Jan 31 22:21:29 2011 -0800
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,69 +0,0 @@
     3.4 -/*
     3.5 -    SDL - Simple DirectMedia Layer
     3.6 -    Copyright (C) 1997-2010 Sam Lantinga
     3.7 -
     3.8 -    This library is free software; you can redistribute it and/or
     3.9 -    modify it under the terms of the GNU Lesser General Public
    3.10 -    License as published by the Free Software Foundation; either
    3.11 -    version 2.1 of the License, or (at your option) any later version.
    3.12 -
    3.13 -    This library is distributed in the hope that it will be useful,
    3.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    3.16 -    Lesser General Public License for more details.
    3.17 -
    3.18 -    You should have received a copy of the GNU Lesser General Public
    3.19 -    License along with this library; if not, write to the Free Software
    3.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    3.21 -
    3.22 -    Sam Lantinga
    3.23 -    slouken@libsdl.org
    3.24 -*/
    3.25 -
    3.26 -/**
    3.27 - *  \file SDL_scalemode.h
    3.28 - *  
    3.29 - *  Header file declaring the SDL_ScaleMode enumeration
    3.30 - */
    3.31 -
    3.32 -#ifndef _SDL_scalemode_h
    3.33 -#define _SDL_scalemode_h
    3.34 -
    3.35 -#include "begin_code.h"
    3.36 -/* Set up for C function definitions, even when using C++ */
    3.37 -#ifdef __cplusplus
    3.38 -/* *INDENT-OFF* */
    3.39 -extern "C" {
    3.40 -/* *INDENT-ON* */
    3.41 -#endif
    3.42 -
    3.43 -/**
    3.44 - *  \brief The texture scale mode used in SDL_RenderCopy().
    3.45 - */
    3.46 -typedef enum
    3.47 -{
    3.48 -    SDL_SCALEMODE_NONE = 0x00000000,     /**< No scaling, rectangles must
    3.49 -                                              match dimensions */
    3.50 -    
    3.51 -    SDL_SCALEMODE_FAST = 0x00000001,     /**< Point sampling or 
    3.52 -                                              equivalent algorithm */
    3.53 -    
    3.54 -    SDL_SCALEMODE_SLOW = 0x00000002,     /**< Linear filtering or 
    3.55 -                                              equivalent algorithm */
    3.56 -    
    3.57 -    SDL_SCALEMODE_BEST = 0x00000004      /**< Bicubic filtering or 
    3.58 -                                              equivalent algorithm */
    3.59 -} SDL_ScaleMode;
    3.60 -
    3.61 -
    3.62 -/* Ends C function definitions when using C++ */
    3.63 -#ifdef __cplusplus
    3.64 -/* *INDENT-OFF* */
    3.65 -}
    3.66 -/* *INDENT-ON* */
    3.67 -#endif
    3.68 -#include "close_code.h"
    3.69 -
    3.70 -#endif /* _SDL_video_h */
    3.71 -
    3.72 -/* vi: set ts=4 sw=4 expandtab: */
     4.1 --- a/include/SDL_surface.h	Mon Jan 31 22:21:29 2011 -0800
     4.2 +++ b/include/SDL_surface.h	Mon Jan 31 22:44:43 2011 -0800
     4.3 @@ -33,7 +33,6 @@
     4.4  #include "SDL_pixels.h"
     4.5  #include "SDL_rect.h"
     4.6  #include "SDL_blendmode.h"
     4.7 -#include "SDL_scalemode.h"
     4.8  #include "SDL_rwops.h"
     4.9  
    4.10  #include "begin_code.h"
    4.11 @@ -318,37 +317,6 @@
    4.12                                                      SDL_BlendMode *blendMode);
    4.13  
    4.14  /**
    4.15 - *  \brief Set the scale mode used for blit operations.
    4.16 - *  
    4.17 - *  \param surface   The surface to update.
    4.18 - *  \param scaleMode ::SDL_ScaleMode to use for blit scaling.
    4.19 - *  
    4.20 - *  \return 0 on success, or -1 if the surface is not valid or the scale mode is
    4.21 - *          not supported.
    4.22 - *  
    4.23 - *  \note If the scale mode is not supported, the closest supported mode is 
    4.24 - *        chosen.  Currently only ::SDL_TEXTURESCALEMODE_FAST is supported on 
    4.25 - *        surfaces.
    4.26 - *  
    4.27 - *  \sa SDL_GetSurfaceScaleMode()
    4.28 - */
    4.29 -extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface,
    4.30 -                                                    SDL_ScaleMode scaleMode);
    4.31 -
    4.32 -/**
    4.33 - *  \brief Get the scale mode used for blit operations.
    4.34 - *  
    4.35 - *  \param surface   The surface to query.
    4.36 - *  \param scaleMode A pointer filled in with the current scale mode.
    4.37 - *  
    4.38 - *  \return 0 on success, or -1 if the surface is not valid.
    4.39 - *  
    4.40 - *  \sa SDL_SetSurfaceScaleMode()
    4.41 - */
    4.42 -extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface,
    4.43 -                                                    SDL_ScaleMode *scaleMode);
    4.44 -
    4.45 -/**
    4.46   *  Sets the clipping rectangle for the destination surface in a blit.
    4.47   *  
    4.48   *  If the clip rectangle is NULL, clipping will be disabled.
     5.1 --- a/include/SDL_video.h	Mon Jan 31 22:21:29 2011 -0800
     5.2 +++ b/include/SDL_video.h	Mon Jan 31 22:44:43 2011 -0800
     5.3 @@ -33,7 +33,6 @@
     5.4  #include "SDL_pixels.h"
     5.5  #include "SDL_rect.h"
     5.6  #include "SDL_blendmode.h"
     5.7 -#include "SDL_scalemode.h"
     5.8  #include "SDL_surface.h"
     5.9  
    5.10  #include "begin_code.h"
    5.11 @@ -189,7 +188,6 @@
    5.12      Uint32 flags;               /**< Supported ::SDL_RendererFlags */
    5.13      Uint32 mod_modes;           /**< A mask of supported channel modulation */
    5.14      Uint32 blend_modes;         /**< A mask of supported blend modes */
    5.15 -    Uint32 scale_modes;         /**< A mask of supported scale modes */
    5.16      Uint32 num_texture_formats; /**< The number of available texture formats */
    5.17      Uint32 texture_formats[50]; /**< The available texture formats */
    5.18      int max_texture_width;      /**< The maximimum texture width */
    5.19 @@ -969,36 +967,6 @@
    5.20                                                      SDL_BlendMode *blendMode);
    5.21  
    5.22  /**
    5.23 - *  \brief Set the scale mode used for texture copy operations.
    5.24 - *  
    5.25 - *  \param texture The texture to update.
    5.26 - *  \param scaleMode ::SDL_ScaleMode to use for texture scaling.
    5.27 - *  
    5.28 - *  \return 0 on success, or -1 if the texture is not valid or the scale mode is
    5.29 - *          not supported.
    5.30 - *  
    5.31 - *  \note If the scale mode is not supported, the closest supported mode is
    5.32 - *        chosen.
    5.33 - *  
    5.34 - *  \sa SDL_GetTextureScaleMode()
    5.35 - */
    5.36 -extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
    5.37 -                                                    SDL_ScaleMode scaleMode);
    5.38 -
    5.39 -/**
    5.40 - *  \brief Get the scale mode used for texture copy operations.
    5.41 - *  
    5.42 - *  \param texture The texture to query.
    5.43 - *  \param scaleMode A pointer filled in with the current scale mode.
    5.44 - *  
    5.45 - *  \return 0 on success, or -1 if the texture is not valid.
    5.46 - *  
    5.47 - *  \sa SDL_SetTextureScaleMode()
    5.48 - */
    5.49 -extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
    5.50 -                                                    SDL_ScaleMode *scaleMode);
    5.51 -
    5.52 -/**
    5.53   *  \brief Update the given texture rectangle with new pixel data.
    5.54   *  
    5.55   *  \param texture The texture to update
     6.1 --- a/src/video/SDL_renderer_gl.c	Mon Jan 31 22:21:29 2011 -0800
     6.2 +++ b/src/video/SDL_renderer_gl.c	Mon Jan 31 22:44:43 2011 -0800
     6.3 @@ -85,8 +85,6 @@
     6.4                                   SDL_Texture * texture);
     6.5  static int GL_SetTextureBlendMode(SDL_Renderer * renderer,
     6.6                                    SDL_Texture * texture);
     6.7 -static int GL_SetTextureScaleMode(SDL_Renderer * renderer,
     6.8 -                                  SDL_Texture * texture);
     6.9  static int GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    6.10                              const SDL_Rect * rect, const void *pixels,
    6.11                              int pitch);
    6.12 @@ -126,7 +124,6 @@
    6.13        SDL_TEXTUREMODULATE_ALPHA),
    6.14       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    6.15        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    6.16 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW),
    6.17       15,
    6.18       {
    6.19        SDL_PIXELFORMAT_INDEX1LSB,
    6.20 @@ -159,7 +156,6 @@
    6.21      SDL_bool GL_MESA_ycbcr_texture_supported;
    6.22      SDL_bool GL_ARB_fragment_program_supported;
    6.23      int blendMode;
    6.24 -    int scaleMode;
    6.25  
    6.26      /* OpenGL functions */
    6.27  #define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
    6.28 @@ -303,7 +299,6 @@
    6.29      renderer->SetTextureColorMod = GL_SetTextureColorMod;
    6.30      renderer->SetTextureAlphaMod = GL_SetTextureAlphaMod;
    6.31      renderer->SetTextureBlendMode = GL_SetTextureBlendMode;
    6.32 -    renderer->SetTextureScaleMode = GL_SetTextureScaleMode;
    6.33      renderer->UpdateTexture = GL_UpdateTexture;
    6.34      renderer->LockTexture = GL_LockTexture;
    6.35      renderer->UnlockTexture = GL_UnlockTexture;
    6.36 @@ -422,7 +417,6 @@
    6.37  
    6.38      /* Set up parameters for rendering */
    6.39      data->blendMode = -1;
    6.40 -    data->scaleMode = -1;
    6.41      data->glDisable(GL_DEPTH_TEST);
    6.42      data->glDisable(GL_CULL_FACE);
    6.43      /* This ended up causing video discrepancies between OpenGL and Direct3D */
    6.44 @@ -842,9 +836,9 @@
    6.45      renderdata->glEnable(data->type);
    6.46      renderdata->glBindTexture(data->type, data->texture);
    6.47      renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
    6.48 -                                GL_NEAREST);
    6.49 +                                GL_LINEAR);
    6.50      renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
    6.51 -                                GL_NEAREST);
    6.52 +                                GL_LINEAR);
    6.53      renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
    6.54                                  GL_CLAMP_TO_EDGE);
    6.55      renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
    6.56 @@ -1001,25 +995,6 @@
    6.57  }
    6.58  
    6.59  static int
    6.60 -GL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    6.61 -{
    6.62 -    switch (texture->scaleMode) {
    6.63 -    case SDL_SCALEMODE_NONE:
    6.64 -    case SDL_SCALEMODE_FAST:
    6.65 -    case SDL_SCALEMODE_SLOW:
    6.66 -        return 0;
    6.67 -    case SDL_SCALEMODE_BEST:
    6.68 -        SDL_Unsupported();
    6.69 -        texture->scaleMode = SDL_SCALEMODE_SLOW;
    6.70 -        return -1;
    6.71 -    default:
    6.72 -        SDL_Unsupported();
    6.73 -        texture->scaleMode = SDL_SCALEMODE_NONE;
    6.74 -        return -1;
    6.75 -    }
    6.76 -}
    6.77 -
    6.78 -static int
    6.79  GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    6.80                   const SDL_Rect * rect, const void *pixels, int pitch)
    6.81  {
    6.82 @@ -1363,26 +1338,6 @@
    6.83          }
    6.84      }
    6.85  
    6.86 -    if (texture->scaleMode != data->scaleMode) {
    6.87 -        switch (texture->scaleMode) {
    6.88 -        case SDL_SCALEMODE_NONE:
    6.89 -        case SDL_SCALEMODE_FAST:
    6.90 -            data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
    6.91 -                                  GL_NEAREST);
    6.92 -            data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    6.93 -                                  GL_NEAREST);
    6.94 -            break;
    6.95 -        case SDL_SCALEMODE_SLOW:
    6.96 -        case SDL_SCALEMODE_BEST:
    6.97 -            data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
    6.98 -                                  GL_LINEAR);
    6.99 -            data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
   6.100 -                                  GL_LINEAR);
   6.101 -            break;
   6.102 -        }
   6.103 -        data->scaleMode = texture->scaleMode;
   6.104 -    }
   6.105 -
   6.106      if (shader) {
   6.107          data->glEnable(GL_FRAGMENT_PROGRAM_ARB);
   6.108          data->glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader);
     7.1 --- a/src/video/SDL_renderer_gles.c	Mon Jan 31 22:21:29 2011 -0800
     7.2 +++ b/src/video/SDL_renderer_gles.c	Mon Jan 31 22:44:43 2011 -0800
     7.3 @@ -73,8 +73,6 @@
     7.4                                     SDL_Texture * texture);
     7.5  static int GLES_SetTextureBlendMode(SDL_Renderer * renderer,
     7.6                                      SDL_Texture * texture);
     7.7 -static int GLES_SetTextureScaleMode(SDL_Renderer * renderer,
     7.8 -                                    SDL_Texture * texture);
     7.9  static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    7.10                                const SDL_Rect * rect, const void *pixels,
    7.11                                int pitch);
    7.12 @@ -112,7 +110,6 @@
    7.13        SDL_TEXTUREMODULATE_ALPHA),
    7.14       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    7.15        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    7.16 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 6,
    7.17       {
    7.18        /* OpenGL ES 1.x supported formats list */
    7.19        SDL_PIXELFORMAT_RGBA4444,
    7.20 @@ -241,7 +238,6 @@
    7.21      renderer->SetTextureColorMod = GLES_SetTextureColorMod;
    7.22      renderer->SetTextureAlphaMod = GLES_SetTextureAlphaMod;
    7.23      renderer->SetTextureBlendMode = GLES_SetTextureBlendMode;
    7.24 -    renderer->SetTextureScaleMode = GLES_SetTextureScaleMode;
    7.25      renderer->UpdateTexture = GLES_UpdateTexture;
    7.26      renderer->LockTexture = GLES_LockTexture;
    7.27      renderer->UnlockTexture = GLES_UnlockTexture;
    7.28 @@ -449,9 +445,9 @@
    7.29      data->formattype = type;
    7.30      renderdata->glBindTexture(data->type, data->texture);
    7.31      renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
    7.32 -                                GL_NEAREST);
    7.33 +                                GL_LINEAR);
    7.34      renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
    7.35 -                                GL_NEAREST);
    7.36 +                                GL_LINEAR);
    7.37      renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
    7.38                                  GL_CLAMP_TO_EDGE);
    7.39      renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
    7.40 @@ -535,25 +531,6 @@
    7.41  }
    7.42  
    7.43  static int
    7.44 -GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    7.45 -{
    7.46 -    switch (texture->scaleMode) {
    7.47 -    case SDL_SCALEMODE_NONE:
    7.48 -    case SDL_SCALEMODE_FAST:
    7.49 -    case SDL_SCALEMODE_SLOW:
    7.50 -        return 0;
    7.51 -    case SDL_SCALEMODE_BEST:
    7.52 -        SDL_Unsupported();
    7.53 -        texture->scaleMode = SDL_SCALEMODE_SLOW;
    7.54 -        return -1;
    7.55 -    default:
    7.56 -        SDL_Unsupported();
    7.57 -        texture->scaleMode = SDL_SCALEMODE_NONE;
    7.58 -        return -1;
    7.59 -    }
    7.60 -}
    7.61 -
    7.62 -static int
    7.63  GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    7.64                     const SDL_Rect * rect, const void *pixels, int pitch)
    7.65  {
    7.66 @@ -878,23 +855,6 @@
    7.67  
    7.68      GLES_SetBlendMode(data, texture->blendMode, 0);
    7.69  
    7.70 -    switch (texture->scaleMode) {
    7.71 -    case SDL_SCALEMODE_NONE:
    7.72 -    case SDL_SCALEMODE_FAST:
    7.73 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
    7.74 -                              GL_NEAREST);
    7.75 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    7.76 -                              GL_NEAREST);
    7.77 -        break;
    7.78 -    case SDL_SCALEMODE_SLOW:
    7.79 -    case SDL_SCALEMODE_BEST:
    7.80 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
    7.81 -                              GL_LINEAR);
    7.82 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    7.83 -                              GL_LINEAR);
    7.84 -        break;
    7.85 -    }
    7.86 -
    7.87      if (data->GL_OES_draw_texture_supported && data->useDrawTexture) {
    7.88          /* this code is a little funny because the viewport is upside down vs SDL's coordinate system */
    7.89          SDL_Window *window = renderer->window;
     8.1 --- a/src/video/SDL_renderer_sw.c	Mon Jan 31 22:21:29 2011 -0800
     8.2 +++ b/src/video/SDL_renderer_sw.c	Mon Jan 31 22:44:43 2011 -0800
     8.3 @@ -51,8 +51,6 @@
     8.4                                   SDL_Texture * texture);
     8.5  static int SW_SetTextureBlendMode(SDL_Renderer * renderer,
     8.6                                    SDL_Texture * texture);
     8.7 -static int SW_SetTextureScaleMode(SDL_Renderer * renderer,
     8.8 -                                  SDL_Texture * texture);
     8.9  static int SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    8.10                              const SDL_Rect * rect, const void *pixels,
    8.11                              int pitch);
    8.12 @@ -90,7 +88,6 @@
    8.13        SDL_TEXTUREMODULATE_ALPHA),
    8.14       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    8.15        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    8.16 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST),
    8.17       14,
    8.18       {
    8.19        SDL_PIXELFORMAT_INDEX8,
    8.20 @@ -180,7 +177,6 @@
    8.21      renderer->SetTextureColorMod = SW_SetTextureColorMod;
    8.22      renderer->SetTextureAlphaMod = SW_SetTextureAlphaMod;
    8.23      renderer->SetTextureBlendMode = SW_SetTextureBlendMode;
    8.24 -    renderer->SetTextureScaleMode = SW_SetTextureScaleMode;
    8.25      renderer->UpdateTexture = SW_UpdateTexture;
    8.26      renderer->LockTexture = SW_LockTexture;
    8.27      renderer->UnlockTexture = SW_UnlockTexture;
    8.28 @@ -188,7 +184,6 @@
    8.29  
    8.30      renderer->info.mod_modes = SW_RenderDriver.info.mod_modes;
    8.31      renderer->info.blend_modes = SW_RenderDriver.info.blend_modes;
    8.32 -    renderer->info.scale_modes = SW_RenderDriver.info.scale_modes;
    8.33      renderer->info.num_texture_formats =
    8.34          SW_RenderDriver.info.num_texture_formats;
    8.35      SDL_memcpy(renderer->info.texture_formats,
    8.36 @@ -396,7 +391,6 @@
    8.37                                 texture->b);
    8.38          SDL_SetSurfaceAlphaMod(texture->driverdata, texture->a);
    8.39          SDL_SetSurfaceBlendMode(texture->driverdata, texture->blendMode);
    8.40 -        SDL_SetSurfaceScaleMode(texture->driverdata, texture->scaleMode);
    8.41  
    8.42          if (texture->access == SDL_TEXTUREACCESS_STATIC) {
    8.43              SDL_SetSurfaceRLE(texture->driverdata, 1);
    8.44 @@ -480,13 +474,6 @@
    8.45  }
    8.46  
    8.47  static int
    8.48 -SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    8.49 -{
    8.50 -    SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
    8.51 -    return SDL_SetSurfaceScaleMode(surface, texture->scaleMode);
    8.52 -}
    8.53 -
    8.54 -static int
    8.55  SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    8.56                   const SDL_Rect * rect, const void *pixels, int pitch)
    8.57  {
     9.1 --- a/src/video/SDL_surface.c	Mon Jan 31 22:21:29 2011 -0800
     9.2 +++ b/src/video/SDL_surface.c	Mon Jan 31 22:44:43 2011 -0800
     9.3 @@ -518,64 +518,6 @@
     9.4      return 0;
     9.5  }
     9.6  
     9.7 -int
     9.8 -SDL_SetSurfaceScaleMode(SDL_Surface * surface, SDL_ScaleMode scaleMode)
     9.9 -{
    9.10 -    int flags, status;
    9.11 -
    9.12 -    if (!surface) {
    9.13 -        return -1;
    9.14 -    }
    9.15 -
    9.16 -    status = 0;
    9.17 -    flags = surface->map->info.flags;
    9.18 -    surface->map->info.flags &= ~(SDL_COPY_NEAREST);
    9.19 -    switch (scaleMode) {
    9.20 -    case SDL_SCALEMODE_NONE:
    9.21 -        break;
    9.22 -    case SDL_SCALEMODE_FAST:
    9.23 -        surface->map->info.flags |= SDL_COPY_NEAREST;
    9.24 -        break;
    9.25 -    case SDL_SCALEMODE_SLOW:
    9.26 -    case SDL_SCALEMODE_BEST:
    9.27 -        SDL_Unsupported();
    9.28 -        surface->map->info.flags |= SDL_COPY_NEAREST;
    9.29 -        status = -1;
    9.30 -        break;
    9.31 -    default:
    9.32 -        SDL_Unsupported();
    9.33 -        status = -1;
    9.34 -        break;
    9.35 -    }
    9.36 -
    9.37 -    if (surface->map->info.flags != flags) {
    9.38 -        SDL_InvalidateMap(surface->map);
    9.39 -    }
    9.40 -    return status;
    9.41 -}
    9.42 -
    9.43 -int
    9.44 -SDL_GetSurfaceScaleMode(SDL_Surface * surface, SDL_ScaleMode *scaleMode)
    9.45 -{
    9.46 -    if (!surface) {
    9.47 -        return -1;
    9.48 -    }
    9.49 -
    9.50 -    if (!scaleMode) {
    9.51 -        return 0;
    9.52 -    }
    9.53 -
    9.54 -    switch (surface->map->info.flags & SDL_COPY_NEAREST) {
    9.55 -    case SDL_COPY_NEAREST:
    9.56 -        *scaleMode = SDL_SCALEMODE_FAST;
    9.57 -        break;
    9.58 -    default:
    9.59 -        *scaleMode = SDL_SCALEMODE_NONE;
    9.60 -        break;
    9.61 -    }
    9.62 -    return 0;
    9.63 -}
    9.64 -
    9.65  SDL_bool
    9.66  SDL_SetClipRect(SDL_Surface * surface, const SDL_Rect * rect)
    9.67  {
    10.1 --- a/src/video/SDL_sysvideo.h	Mon Jan 31 22:21:29 2011 -0800
    10.2 +++ b/src/video/SDL_sysvideo.h	Mon Jan 31 22:44:43 2011 -0800
    10.3 @@ -47,7 +47,6 @@
    10.4      int h;                      /**< The height of the texture */
    10.5      int modMode;                /**< The texture modulation mode */
    10.6      SDL_BlendMode blendMode;    /**< The texture blend mode */
    10.7 -    SDL_ScaleMode scaleMode;    /**< The texture scale mode */
    10.8      Uint8 r, g, b, a;           /**< Texture modulation values */
    10.9  
   10.10      SDL_Renderer *renderer;
   10.11 @@ -78,8 +77,6 @@
   10.12                                 SDL_Texture * texture);
   10.13      int (*SetTextureBlendMode) (SDL_Renderer * renderer,
   10.14                                  SDL_Texture * texture);
   10.15 -    int (*SetTextureScaleMode) (SDL_Renderer * renderer,
   10.16 -                                SDL_Texture * texture);
   10.17      int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
   10.18                            const SDL_Rect * rect, const void *pixels,
   10.19                            int pitch);
    11.1 --- a/src/video/SDL_video.c	Mon Jan 31 22:21:29 2011 -0800
    11.2 +++ b/src/video/SDL_video.c	Mon Jan 31 22:44:43 2011 -0800
    11.3 @@ -1961,7 +1961,6 @@
    11.4      {
    11.5          Uint8 r, g, b, a;
    11.6          SDL_BlendMode blendMode;
    11.7 -        SDL_ScaleMode scaleMode;
    11.8  
    11.9          SDL_GetSurfaceColorMod(surface, &r, &g, &b);
   11.10          SDL_SetTextureColorMod(texture, r, g, b);
   11.11 @@ -1976,9 +1975,6 @@
   11.12              SDL_GetSurfaceBlendMode(surface, &blendMode);
   11.13              SDL_SetTextureBlendMode(texture, blendMode);
   11.14          }
   11.15 -
   11.16 -        SDL_GetSurfaceScaleMode(surface, &scaleMode);
   11.17 -        SDL_SetTextureScaleMode(texture, scaleMode);
   11.18      }
   11.19  
   11.20      if (SDL_ISPIXELFORMAT_INDEXED(format) && fmt->palette) {
   11.21 @@ -2162,33 +2158,6 @@
   11.22  }
   11.23  
   11.24  int
   11.25 -SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)
   11.26 -{
   11.27 -    SDL_Renderer *renderer;
   11.28 -
   11.29 -    CHECK_TEXTURE_MAGIC(texture, -1);
   11.30 -
   11.31 -    renderer = texture->renderer;
   11.32 -    if (!renderer->SetTextureScaleMode) {
   11.33 -        SDL_Unsupported();
   11.34 -        return -1;
   11.35 -    }
   11.36 -    texture->scaleMode = scaleMode;
   11.37 -    return renderer->SetTextureScaleMode(renderer, texture);
   11.38 -}
   11.39 -
   11.40 -int
   11.41 -SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode)
   11.42 -{
   11.43 -    CHECK_TEXTURE_MAGIC(texture, -1);
   11.44 -
   11.45 -    if (scaleMode) {
   11.46 -        *scaleMode = texture->scaleMode;
   11.47 -    }
   11.48 -    return 0;
   11.49 -}
   11.50 -
   11.51 -int
   11.52  SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect,
   11.53                    const void *pixels, int pitch)
   11.54  {
    12.1 --- a/src/video/directfb/SDL_DirectFB_render.c	Mon Jan 31 22:21:29 2011 -0800
    12.2 +++ b/src/video/directfb/SDL_DirectFB_render.c	Mon Jan 31 22:44:43 2011 -0800
    12.3 @@ -57,8 +57,6 @@
    12.4                                         SDL_Texture * texture);
    12.5  static int DirectFB_SetTextureBlendMode(SDL_Renderer * renderer,
    12.6                                          SDL_Texture * texture);
    12.7 -static int DirectFB_SetTextureScaleMode(SDL_Renderer * renderer,
    12.8 -                                        SDL_Texture * texture);
    12.9  static int DirectFB_UpdateTexture(SDL_Renderer * renderer,
   12.10                                    SDL_Texture * texture,
   12.11                                    const SDL_Rect * rect,
   12.12 @@ -104,8 +102,6 @@
   12.13        SDL_TEXTUREMODULATE_ALPHA),
   12.14       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND |
   12.15        SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
   12.16 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
   12.17 -      SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST),
   12.18       14,
   12.19       {
   12.20        SDL_PIXELFORMAT_INDEX4LSB,
   12.21 @@ -298,7 +294,6 @@
   12.22      renderer->SetTextureAlphaMod = DirectFB_SetTextureAlphaMod;
   12.23      renderer->SetTextureColorMod = DirectFB_SetTextureColorMod;
   12.24      renderer->SetTextureBlendMode = DirectFB_SetTextureBlendMode;
   12.25 -    renderer->SetTextureScaleMode = DirectFB_SetTextureScaleMode;
   12.26      renderer->UpdateTexture = DirectFB_UpdateTexture;
   12.27      renderer->LockTexture = DirectFB_LockTexture;
   12.28      renderer->UnlockTexture = DirectFB_UnlockTexture;
    13.1 --- a/src/video/nds/SDL_ndsrender.c	Mon Jan 31 22:21:29 2011 -0800
    13.2 +++ b/src/video/nds/SDL_ndsrender.c	Mon Jan 31 22:44:43 2011 -0800
    13.3 @@ -56,8 +56,6 @@
    13.4                                    SDL_Texture * texture);
    13.5  static int NDS_SetTextureBlendMode(SDL_Renderer * renderer,
    13.6                                     SDL_Texture * texture);
    13.7 -static int NDS_SetTextureScaleMode(SDL_Renderer * renderer,
    13.8 -                                   SDL_Texture * texture);
    13.9  static int NDS_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   13.10                               const SDL_Rect * rect, const void *pixels,
   13.11                               int pitch);
   13.12 @@ -82,7 +80,6 @@
   13.13       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC),  /* u32 flags */
   13.14       (SDL_TEXTUREMODULATE_NONE),        /* u32 mod_modes */
   13.15       (SDL_BLENDMODE_MASK),      /* u32 blend_modes */
   13.16 -     (SDL_SCALEMODE_FAST),       /* u32 scale_modes */
   13.17       3,                         /* u32 num_texture_formats */
   13.18       {
   13.19        SDL_PIXELFORMAT_INDEX8,
   13.20 @@ -184,7 +181,6 @@
   13.21      renderer->SetTextureColorMod = NDS_SetTextureColorMod;
   13.22      renderer->SetTextureAlphaMod = NDS_SetTextureAlphaMod;
   13.23      renderer->SetTextureBlendMode = NDS_SetTextureBlendMode;
   13.24 -    renderer->SetTextureScaleMode = NDS_SetTextureScaleMode;
   13.25      renderer->UpdateTexture = NDS_UpdateTexture;
   13.26      renderer->LockTexture = NDS_LockTexture;
   13.27      renderer->UnlockTexture = NDS_UnlockTexture;
   13.28 @@ -192,7 +188,6 @@
   13.29  
   13.30      renderer->info.mod_modes = NDS_RenderDriver.info.mod_modes;
   13.31      renderer->info.blend_modes = NDS_RenderDriver.info.blend_modes;
   13.32 -    renderer->info.scale_modes = NDS_RenderDriver.info.scale_modes;
   13.33      renderer->info.num_texture_formats =
   13.34          NDS_RenderDriver.info.num_texture_formats;
   13.35      SDL_memcpy(renderer->info.texture_formats,
   13.36 @@ -588,11 +583,4 @@
   13.37      return 0;
   13.38  }
   13.39  
   13.40 -static int
   13.41 -NDS_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   13.42 -{
   13.43 -    /* stub! (note: NDS hardware scaling is nearest neighbor.) */
   13.44 -    return 0;
   13.45 -}
   13.46 -
   13.47  /* vi: set ts=4 sw=4 expandtab: */
    14.1 --- a/src/video/photon/SDL_photon_render.c	Mon Jan 31 22:21:29 2011 -0800
    14.2 +++ b/src/video/photon/SDL_photon_render.c	Mon Jan 31 22:44:43 2011 -0800
    14.3 @@ -104,7 +104,6 @@
    14.4       (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_ALPHA),
    14.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND |
    14.6        SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    14.7 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_SLOW | SDL_SCALEMODE_FAST),
    14.8       10,
    14.9       {SDL_PIXELFORMAT_INDEX8,
   14.10        SDL_PIXELFORMAT_RGB555,
   14.11 @@ -153,7 +152,6 @@
   14.12      renderer->SetTextureAlphaMod = photon_settexturealphamod;
   14.13      renderer->SetTextureColorMod = photon_settexturecolormod;
   14.14      renderer->SetTextureBlendMode = photon_settextureblendmode;
   14.15 -    renderer->SetTextureScaleMode = photon_settexturescalemode;
   14.16      renderer->UpdateTexture = photon_updatetexture;
   14.17      renderer->LockTexture = photon_locktexture;
   14.18      renderer->UnlockTexture = photon_unlocktexture;
   14.19 @@ -250,22 +248,6 @@
   14.20      /* Initialize surfaces */
   14.21      _photon_recreate_surfaces(renderer);
   14.22  
   14.23 -    /* Set current scale blitting capabilities */
   14.24 -    if (rdata->surfaces_type==SDL_PHOTON_SURFTYPE_OFFSCREEN)
   14.25 -    {
   14.26 -       renderer->info.scale_modes=SDL_SCALEMODE_NONE | SDL_SCALEMODE_SLOW;
   14.27 -       if ((didata->mode_2dcaps & SDL_VIDEO_PHOTON_CAP_SCALED_BLIT)==SDL_VIDEO_PHOTON_CAP_SCALED_BLIT)
   14.28 -       {
   14.29 -          /* This video mode supports hardware scaling */
   14.30 -          renderer->info.scale_modes|=SDL_SCALEMODE_FAST;
   14.31 -       }
   14.32 -    }
   14.33 -    else
   14.34 -    {
   14.35 -       /* PhImage blit functions do not support scaling */
   14.36 -       renderer->info.scale_modes=SDL_SCALEMODE_NONE;
   14.37 -    }
   14.38 -
   14.39      return renderer;
   14.40  }
   14.41  
   14.42 @@ -977,53 +959,6 @@
   14.43  }
   14.44  
   14.45  static int
   14.46 -photon_settexturescalemode(SDL_Renderer * renderer, SDL_Texture * texture)
   14.47 -{
   14.48 -   SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
   14.49 -
   14.50 -   switch (texture->scaleMode)
   14.51 -   {
   14.52 -      case SDL_SCALEMODE_NONE:
   14.53 -           return 0;
   14.54 -      case SDL_SCALEMODE_FAST:
   14.55 -           if ((renderer->info.scale_modes & SDL_SCALEMODE_FAST)==SDL_SCALEMODE_FAST)
   14.56 -           {
   14.57 -              return 0;
   14.58 -           }
   14.59 -           else
   14.60 -           {
   14.61 -              SDL_Unsupported();
   14.62 -              texture->scaleMode = SDL_SCALEMODE_FAST;
   14.63 -              return -1;
   14.64 -           }
   14.65 -           break;
   14.66 -      case SDL_SCALEMODE_SLOW:
   14.67 -           if ((renderer->info.scale_modes & SDL_SCALEMODE_SLOW)==SDL_SCALEMODE_SLOW)
   14.68 -           {
   14.69 -              return 0;
   14.70 -           }
   14.71 -           else
   14.72 -           {
   14.73 -              SDL_Unsupported();
   14.74 -              texture->scaleMode = SDL_SCALEMODE_SLOW;
   14.75 -              return -1;
   14.76 -           }
   14.77 -           break;
   14.78 -      case SDL_SCALEMODE_BEST:
   14.79 -           SDL_Unsupported();
   14.80 -           texture->scaleMode = SDL_SCALEMODE_SLOW;
   14.81 -           return -1;
   14.82 -      default:
   14.83 -           SDL_Unsupported();
   14.84 -           texture->scaleMode = SDL_SCALEMODE_NONE;
   14.85 -           return -1;
   14.86 -   }
   14.87 -
   14.88 -   SDL_Unsupported();
   14.89 -   return -1;
   14.90 -}
   14.91 -
   14.92 -static int
   14.93  photon_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture,
   14.94                       const SDL_Rect * rect, const void *pixels, int pitch)
   14.95  {
    15.1 --- a/src/video/qnxgf/SDL_gf_render.c	Mon Jan 31 22:21:29 2011 -0800
    15.2 +++ b/src/video/qnxgf/SDL_gf_render.c	Mon Jan 31 22:44:43 2011 -0800
    15.3 @@ -87,7 +87,6 @@
    15.4        SDL_TEXTUREMODULATE_ALPHA),
    15.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    15.6        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    15.7 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_SLOW),
    15.8       13,
    15.9       {
   15.10        SDL_PIXELFORMAT_INDEX8,
   15.11 @@ -149,7 +148,6 @@
   15.12      renderer->SetTextureAlphaMod = gf_settexturealphamod;
   15.13      renderer->SetTextureColorMod = gf_settexturecolormod;
   15.14      renderer->SetTextureBlendMode = gf_settextureblendmode;
   15.15 -    renderer->SetTextureScaleMode = gf_settexturescalemode;
   15.16      renderer->UpdateTexture = gf_updatetexture;
   15.17      renderer->LockTexture = gf_locktexture;
   15.18      renderer->UnlockTexture = gf_unlocktexture;
    16.1 --- a/src/video/windows/SDL_ceddrawrender.c	Mon Jan 31 22:21:29 2011 -0800
    16.2 +++ b/src/video/windows/SDL_ceddrawrender.c	Mon Jan 31 22:44:43 2011 -0800
    16.3 @@ -51,8 +51,6 @@
    16.4                                      SDL_Texture * texture);
    16.5  static int DDRAW_SetTextureBlendMode(SDL_Renderer * renderer,
    16.6                                       SDL_Texture * texture);
    16.7 -static int DDRAW_SetTextureScaleMode(SDL_Renderer * renderer,
    16.8 -                                     SDL_Texture * texture);
    16.9  static int DDRAW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   16.10                                 const SDL_Rect * rect, const void *pixels,
   16.11                                 int pitch);
   16.12 @@ -85,7 +83,6 @@
   16.13        SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
   16.14       (SDL_TEXTUREMODULATE_NONE),
   16.15       (SDL_BLENDMODE_NONE),
   16.16 -     (SDL_SCALEMODE_NONE),
   16.17       0,
   16.18       {0},
   16.19       0,
   16.20 @@ -468,7 +465,6 @@
   16.21      renderer->SetTextureColorMod = DDRAW_SetTextureColorMod;
   16.22      renderer->SetTextureAlphaMod = DDRAW_SetTextureAlphaMod;
   16.23      renderer->SetTextureBlendMode = DDRAW_SetTextureBlendMode;
   16.24 -    renderer->SetTextureScaleMode = DDRAW_SetTextureScaleMode;
   16.25      renderer->UpdateTexture = DDRAW_UpdateTexture;
   16.26      renderer->LockTexture = DDRAW_LockTexture;
   16.27      renderer->UnlockTexture = DDRAW_UnlockTexture;
   16.28 @@ -663,19 +659,6 @@
   16.29  }
   16.30  
   16.31  static int
   16.32 -DDRAW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   16.33 -{
   16.34 -    switch (texture->scaleMode) {
   16.35 -    case SDL_SCALEMODE_NONE:
   16.36 -    default:
   16.37 -        SDL_Unsupported();
   16.38 -        texture->scaleMode = SDL_SCALEMODE_NONE;
   16.39 -        return -1;
   16.40 -    }
   16.41 -    return 0;
   16.42 -}
   16.43 -
   16.44 -static int
   16.45  DDRAW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   16.46                      const SDL_Rect * rect, const void *pixels, int pitch)
   16.47  {
    17.1 --- a/src/video/windows/SDL_d3drender.c	Mon Jan 31 22:21:29 2011 -0800
    17.2 +++ b/src/video/windows/SDL_d3drender.c	Mon Jan 31 22:44:43 2011 -0800
    17.3 @@ -107,8 +107,6 @@
    17.4                                    SDL_Texture * texture);
    17.5  static int D3D_SetTextureBlendMode(SDL_Renderer * renderer,
    17.6                                     SDL_Texture * texture);
    17.7 -static int D3D_SetTextureScaleMode(SDL_Renderer * renderer,
    17.8 -                                   SDL_Texture * texture);
    17.9  static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   17.10                               const SDL_Rect * rect, const void *pixels,
   17.11                               int pitch);
   17.12 @@ -150,8 +148,6 @@
   17.13        SDL_TEXTUREMODULATE_ALPHA),
   17.14       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
   17.15        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
   17.16 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
   17.17 -      SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST),
   17.18       0,
   17.19       {0},
   17.20       0,
   17.21 @@ -461,7 +457,6 @@
   17.22      renderer->SetTextureColorMod = D3D_SetTextureColorMod;
   17.23      renderer->SetTextureAlphaMod = D3D_SetTextureAlphaMod;
   17.24      renderer->SetTextureBlendMode = D3D_SetTextureBlendMode;
   17.25 -    renderer->SetTextureScaleMode = D3D_SetTextureScaleMode;
   17.26      renderer->UpdateTexture = D3D_UpdateTexture;
   17.27      renderer->LockTexture = D3D_LockTexture;
   17.28      renderer->UnlockTexture = D3D_UnlockTexture;
   17.29 @@ -804,23 +799,6 @@
   17.30  }
   17.31  
   17.32  static int
   17.33 -D3D_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   17.34 -{
   17.35 -    switch (texture->scaleMode) {
   17.36 -    case SDL_SCALEMODE_NONE:
   17.37 -    case SDL_SCALEMODE_FAST:
   17.38 -    case SDL_SCALEMODE_SLOW:
   17.39 -    case SDL_SCALEMODE_BEST:
   17.40 -        return 0;
   17.41 -    default:
   17.42 -        SDL_Unsupported();
   17.43 -        texture->scaleMode = SDL_SCALEMODE_NONE;
   17.44 -        return -1;
   17.45 -    }
   17.46 -    return 0;
   17.47 -}
   17.48 -
   17.49 -static int
   17.50  D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   17.51                    const SDL_Rect * rect, const void *pixels, int pitch)
   17.52  {
   17.53 @@ -1342,27 +1320,10 @@
   17.54          shader = data->ps_mask;
   17.55      }
   17.56  
   17.57 -    switch (texture->scaleMode) {
   17.58 -    case SDL_SCALEMODE_NONE:
   17.59 -    case SDL_SCALEMODE_FAST:
   17.60 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   17.61 -                                         D3DTEXF_POINT);
   17.62 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
   17.63 -                                         D3DTEXF_POINT);
   17.64 -        break;
   17.65 -    case SDL_SCALEMODE_SLOW:
   17.66 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   17.67 -                                         D3DTEXF_LINEAR);
   17.68 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
   17.69 -                                         D3DTEXF_LINEAR);
   17.70 -        break;
   17.71 -    case SDL_SCALEMODE_BEST:
   17.72 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   17.73 -                                         D3DTEXF_GAUSSIANQUAD);
   17.74 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
   17.75 -                                         D3DTEXF_GAUSSIANQUAD);
   17.76 -        break;
   17.77 -    }
   17.78 +    IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   17.79 +                                     D3DTEXF_LINEAR);
   17.80 +    IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
   17.81 +                                     D3DTEXF_LINEAR);
   17.82  
   17.83      result =
   17.84          IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)
    18.1 --- a/src/video/windows/SDL_gapirender.c	Mon Jan 31 22:21:29 2011 -0800
    18.2 +++ b/src/video/windows/SDL_gapirender.c	Mon Jan 31 22:44:43 2011 -0800
    18.3 @@ -210,7 +210,6 @@
    18.4          (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD),
    18.5          (SDL_TEXTUREMODULATE_NONE),
    18.6          (SDL_BLENDMODE_NONE),
    18.7 -        (SDL_SCALEMODE_NONE),
    18.8          7,
    18.9          {
   18.10              SDL_PIXELFORMAT_RGB555,
   18.11 @@ -233,7 +232,6 @@
   18.12          (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD),
   18.13          (SDL_TEXTUREMODULATE_NONE),
   18.14          (SDL_BLENDMODE_NONE),
   18.15 -        (SDL_SCALEMODE_NONE),
   18.16          7,
   18.17          {
   18.18              SDL_PIXELFORMAT_RGB555,
    19.1 --- a/src/video/windows/SDL_windowsvideo.c	Mon Jan 31 22:21:29 2011 -0800
    19.2 +++ b/src/video/windows/SDL_windowsvideo.c	Mon Jan 31 22:44:43 2011 -0800
    19.3 @@ -30,7 +30,6 @@
    19.4  #include "SDL_windowsvideo.h"
    19.5  #include "SDL_windowsshape.h"
    19.6  #include "SDL_d3drender.h"
    19.7 -#include "SDL_gdirender.h"
    19.8  #include "SDL_gapirender.h"
    19.9  
   19.10  /* Initialization/Query functions */
    20.1 --- a/src/video/x11/SDL_x11video.c	Mon Jan 31 22:21:29 2011 -0800
    20.2 +++ b/src/video/x11/SDL_x11video.c	Mon Jan 31 22:44:43 2011 -0800
    20.3 @@ -29,7 +29,6 @@
    20.4  #include "../SDL_pixels_c.h"
    20.5  
    20.6  #include "SDL_x11video.h"
    20.7 -#include "SDL_x11render.h"
    20.8  #include "SDL_x11shape.h"
    20.9  #include "SDL_x11touch.h" 
   20.10  
    21.1 --- a/test/common.c	Mon Jan 31 22:21:29 2011 -0800
    21.2 +++ b/test/common.c	Mon Jan 31 22:44:43 2011 -0800
    21.3 @@ -382,28 +382,6 @@
    21.4  }
    21.5  
    21.6  static void
    21.7 -PrintScaleMode(Uint32 flag)
    21.8 -{
    21.9 -    switch (flag) {
   21.10 -    case SDL_SCALEMODE_NONE:
   21.11 -        fprintf(stderr, "None");
   21.12 -        break;
   21.13 -    case SDL_SCALEMODE_FAST:
   21.14 -        fprintf(stderr, "Fast");
   21.15 -        break;
   21.16 -    case SDL_SCALEMODE_SLOW:
   21.17 -        fprintf(stderr, "Slow");
   21.18 -        break;
   21.19 -    case SDL_SCALEMODE_BEST:
   21.20 -        fprintf(stderr, "Best");
   21.21 -        break;
   21.22 -    default:
   21.23 -        fprintf(stderr, "0x%8.8x", flag);
   21.24 -        break;
   21.25 -    }
   21.26 -}
   21.27 -
   21.28 -static void
   21.29  PrintPixelFormat(Uint32 format)
   21.30  {
   21.31      switch (format) {
   21.32 @@ -540,21 +518,6 @@
   21.33      }
   21.34      fprintf(stderr, ")\n");
   21.35  
   21.36 -    fprintf(stderr, "    Scale: 0x%8.8X", info->scale_modes);
   21.37 -    fprintf(stderr, " (");
   21.38 -    count = 0;
   21.39 -    for (i = 0; i < sizeof(info->scale_modes) * 8; ++i) {
   21.40 -        Uint32 flag = (1 << i);
   21.41 -        if (info->scale_modes & flag) {
   21.42 -            if (count > 0) {
   21.43 -                fprintf(stderr, " | ");
   21.44 -            }
   21.45 -            PrintScaleMode(flag);
   21.46 -            ++count;
   21.47 -        }
   21.48 -    }
   21.49 -    fprintf(stderr, ")\n");
   21.50 -
   21.51      fprintf(stderr, "    Texture formats (%d): ", info->num_texture_formats);
   21.52      for (i = 0; i < (int) info->num_texture_formats; ++i) {
   21.53          if (i > 0) {
    22.1 --- a/test/testsprite2.c	Mon Jan 31 22:21:29 2011 -0800
    22.2 +++ b/test/testsprite2.c	Mon Jan 31 22:44:43 2011 -0800
    22.3 @@ -21,7 +21,6 @@
    22.4  static SDL_Rect *velocities;
    22.5  static int sprite_w, sprite_h;
    22.6  static SDL_BlendMode blendMode = SDL_BLENDMODE_MASK;
    22.7 -static SDL_ScaleMode scaleMode = SDL_SCALEMODE_NONE;
    22.8  
    22.9  /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
   22.10  static void
   22.11 @@ -89,7 +88,6 @@
   22.12              return (-1);
   22.13          }
   22.14          SDL_SetTextureBlendMode(sprites[i], blendMode);
   22.15 -        SDL_SetTextureScaleMode(sprites[i], scaleMode);
   22.16      }
   22.17      SDL_FreeSurface(temp);
   22.18  
   22.19 @@ -253,22 +251,6 @@
   22.20                          consumed = 2;
   22.21                      }
   22.22                  }
   22.23 -            } else if (SDL_strcasecmp(argv[i], "--scale") == 0) {
   22.24 -                if (argv[i + 1]) {
   22.25 -                    if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
   22.26 -                        scaleMode = SDL_SCALEMODE_NONE;
   22.27 -                        consumed = 2;
   22.28 -                    } else if (SDL_strcasecmp(argv[i + 1], "fast") == 0) {
   22.29 -                        scaleMode = SDL_SCALEMODE_FAST;
   22.30 -                        consumed = 2;
   22.31 -                    } else if (SDL_strcasecmp(argv[i + 1], "slow") == 0) {
   22.32 -                        scaleMode = SDL_SCALEMODE_SLOW;
   22.33 -                        consumed = 2;
   22.34 -                    } else if (SDL_strcasecmp(argv[i + 1], "best") == 0) {
   22.35 -                        scaleMode = SDL_SCALEMODE_BEST;
   22.36 -                        consumed = 2;
   22.37 -                    }
   22.38 -                }
   22.39              } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
   22.40                  cycle_color = SDL_TRUE;
   22.41                  consumed = 1;
   22.42 @@ -282,7 +264,7 @@
   22.43          }
   22.44          if (consumed < 0) {
   22.45              fprintf(stderr,
   22.46 -                    "Usage: %s %s [--blend none|mask|blend|add|mod] [--scale none|fast|slow|best] [--cyclecolor] [--cyclealpha]\n",
   22.47 +                    "Usage: %s %s [--blend none|mask|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
   22.48                      argv[0], CommonUsage(state));
   22.49              quit(1);
   22.50          }
   22.51 @@ -316,10 +298,6 @@
   22.52          quit(2);
   22.53      }
   22.54      srand((unsigned int)time(NULL));
   22.55 -    if (scaleMode != SDL_SCALEMODE_NONE) {
   22.56 -        sprite_w += sprite_w / 2;
   22.57 -        sprite_h += sprite_h / 2;
   22.58 -    }
   22.59      for (i = 0; i < num_sprites; ++i) {
   22.60          positions[i].x = rand() % (state->window_w - sprite_w);
   22.61          positions[i].y = rand() % (state->window_h - sprite_h);