Removed SDL_SoftStretch() from the public API

SDL_BlitSurfaceScaled() is more flexible and uses the SDL_SoftStretch() fast path when possible. Having two surface scaling APIs was confusing, especially when one of them has unexpected limitations.
This commit is contained in:
Sam Lantinga
2024-07-20 15:52:42 -07:00
parent 5ce81ebcc9
commit 12e50d17a2
9 changed files with 8 additions and 26 deletions

View File

@@ -806,7 +806,6 @@ SDL3_0.0.0 {
SDL_ShowWindow;
SDL_ShowWindowSystemMenu;
SDL_SignalCondition;
SDL_SoftStretch;
SDL_StartTextInput;
SDL_StepUTF8;
SDL_StopHapticEffect;

View File

@@ -831,7 +831,6 @@
#define SDL_ShowWindow SDL_ShowWindow_REAL
#define SDL_ShowWindowSystemMenu SDL_ShowWindowSystemMenu_REAL
#define SDL_SignalCondition SDL_SignalCondition_REAL
#define SDL_SoftStretch SDL_SoftStretch_REAL
#define SDL_StartTextInput SDL_StartTextInput_REAL
#define SDL_StepUTF8 SDL_StepUTF8_REAL
#define SDL_StopHapticEffect SDL_StopHapticEffect_REAL

View File

@@ -841,7 +841,6 @@ SDL_DYNAPI_PROC(int,SDL_ShowSimpleMessageBox,(SDL_MessageBoxFlags a, const char
SDL_DYNAPI_PROC(int,SDL_ShowWindow,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_ShowWindowSystemMenu,(SDL_Window *a, int b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_SignalCondition,(SDL_Condition *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_SoftStretch,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d, SDL_ScaleMode e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(int,SDL_StartTextInput,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(Uint32,SDL_StepUTF8,(const char **a, size_t *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_StopHapticEffect,(SDL_Haptic *a, int b),(a,b),return)

View File

@@ -25,6 +25,7 @@
#if SDL_HAVE_YUV
#include "SDL_yuv_sw_c.h"
#include "../video/SDL_blit.h"
#include "../video/SDL_yuv_c.h"
SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(SDL_PixelFormat format, int w, int h)

View File

@@ -76,5 +76,6 @@ extern float SDL_GetDefaultSDRWhitePoint(SDL_Colorspace colorspace);
extern float SDL_GetSurfaceSDRWhitePoint(SDL_Surface *surface, SDL_Colorspace colorspace);
extern float SDL_GetDefaultHDRHeadroom(SDL_Colorspace colorspace);
extern float SDL_GetSurfaceHDRHeadroom(SDL_Surface *surface, SDL_Colorspace colorspace);
extern int SDL_SoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
#endif /* SDL_surface_c_h_ */

View File

@@ -25,6 +25,8 @@
#include "SDL_windowsvideo.h"
#include "SDL_windowsshape.h"
#include "../SDL_blit.h"
static void AddRegion(HRGN *mask, int x1, int y1, int x2, int y2)
{

View File

@@ -25,6 +25,8 @@
#include "SDL_x11video.h"
#include "SDL_x11shape.h"
#include "../SDL_blit.h"
#ifdef SDL_VIDEO_DRIVER_X11_XSHAPE
static Uint8 *GenerateShapeMask(SDL_Surface *shape)