diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 71c4ede68..6bef20ebc 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -482,31 +482,6 @@ static int QueueCmdSetDrawColor(SDL_Renderer *renderer, SDL_FColor *color) return retval; } -static int QueueCmdSetColorScale(SDL_Renderer *renderer) -{ - int retval = 0; - - if (!renderer->color_scale_queued || - renderer->color_scale != renderer->last_queued_color_scale) { - SDL_RenderCommand *cmd = AllocateRenderCommand(renderer); - retval = -1; - - if (cmd) { - cmd->command = SDL_RENDERCMD_SETCOLORSCALE; - cmd->data.color.first = 0; /* render backend will fill this in. */ - cmd->data.color.color_scale = renderer->color_scale; - retval = renderer->QueueSetColorScale(renderer, cmd); - if (retval < 0) { - cmd->command = SDL_RENDERCMD_NO_OP; - } else { - renderer->last_queued_color_scale = renderer->color_scale; - renderer->color_scale_queued = SDL_TRUE; - } - } - } - return retval; -} - static int QueueCmdClear(SDL_Renderer *renderer) { SDL_RenderCommand *cmd = AllocateRenderCommand(renderer); @@ -540,10 +515,6 @@ static SDL_RenderCommand *PrepQueueCmdDraw(SDL_Renderer *renderer, const SDL_Ren retval = QueueCmdSetDrawColor(renderer, color); } - if (retval == 0) { - retval = QueueCmdSetColorScale(renderer); - } - /* Set the viewport and clip rect directly before draws, so the backends * don't have to worry about that state not being valid at draw time. */ if (retval == 0 && !renderer->viewport_queued) { diff --git a/src/render/SDL_sysrender.h b/src/render/SDL_sysrender.h index 613afd665..177980f07 100644 --- a/src/render/SDL_sysrender.h +++ b/src/render/SDL_sysrender.h @@ -101,7 +101,6 @@ typedef enum SDL_RENDERCMD_SETVIEWPORT, SDL_RENDERCMD_SETCLIPRECT, SDL_RENDERCMD_SETDRAWCOLOR, - SDL_RENDERCMD_SETCOLORSCALE, SDL_RENDERCMD_CLEAR, SDL_RENDERCMD_DRAW_POINTS, SDL_RENDERCMD_DRAW_LINES, @@ -169,7 +168,6 @@ struct SDL_Renderer int (*CreateTexture)(SDL_Renderer *renderer, SDL_Texture *texture, SDL_PropertiesID create_props); int (*QueueSetViewport)(SDL_Renderer *renderer, SDL_RenderCommand *cmd); int (*QueueSetDrawColor)(SDL_Renderer *renderer, SDL_RenderCommand *cmd); - int (*QueueSetColorScale)(SDL_Renderer *renderer, SDL_RenderCommand *cmd); int (*QueueDrawPoints)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count); int (*QueueDrawLines)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index 23c7d9e11..871538269 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -1181,11 +1181,6 @@ static int D3D_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { SDL_Rect *viewport = &data->drawstate.viewport; @@ -1624,7 +1619,6 @@ SDL_Renderer *D3D_CreateRenderer(SDL_Window *window, SDL_PropertiesID create_pro renderer->SetRenderTarget = D3D_SetRenderTarget; renderer->QueueSetViewport = D3D_QueueNoOp; renderer->QueueSetDrawColor = D3D_QueueNoOp; - renderer->QueueSetColorScale = D3D_QueueNoOp; renderer->QueueDrawPoints = D3D_QueueDrawPoints; renderer->QueueDrawLines = D3D_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = D3D_QueueGeometry; diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c index c875285aa..50e17200f 100644 --- a/src/render/direct3d11/SDL_render_d3d11.c +++ b/src/render/direct3d11/SDL_render_d3d11.c @@ -2474,11 +2474,6 @@ static int D3D11_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, break; /* this isn't currently used in this render backend. */ } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { SDL_Rect *viewport = &rendererData->currentViewport; @@ -2784,7 +2779,6 @@ SDL_Renderer *D3D11_CreateRenderer(SDL_Window *window, SDL_PropertiesID create_p renderer->SetRenderTarget = D3D11_SetRenderTarget; renderer->QueueSetViewport = D3D11_QueueNoOp; renderer->QueueSetDrawColor = D3D11_QueueNoOp; - renderer->QueueSetColorScale = D3D11_QueueNoOp; renderer->QueueDrawPoints = D3D11_QueueDrawPoints; renderer->QueueDrawLines = D3D11_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = D3D11_QueueGeometry; diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c index 1884effb7..3e34a4d74 100644 --- a/src/render/direct3d12/SDL_render_d3d12.c +++ b/src/render/direct3d12/SDL_render_d3d12.c @@ -2828,11 +2828,6 @@ static int D3D12_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, break; /* this isn't currently used in this render backend. */ } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { SDL_Rect *viewport = &rendererData->currentViewport; @@ -3230,7 +3225,6 @@ SDL_Renderer *D3D12_CreateRenderer(SDL_Window *window, SDL_PropertiesID create_p renderer->SetRenderTarget = D3D12_SetRenderTarget; renderer->QueueSetViewport = D3D12_QueueNoOp; renderer->QueueSetDrawColor = D3D12_QueueNoOp; - renderer->QueueSetColorScale = D3D12_QueueNoOp; renderer->QueueDrawPoints = D3D12_QueueDrawPoints; renderer->QueueDrawLines = D3D12_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = D3D12_QueueGeometry; diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m index a8134d9cf..abf45c346 100644 --- a/src/render/metal/SDL_render_metal.m +++ b/src/render/metal/SDL_render_metal.m @@ -1584,11 +1584,6 @@ static int METAL_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_CLEAR: { /* If we're already encoding a command buffer, dump it without committing it. We'd just @@ -2148,7 +2143,6 @@ static SDL_Renderer *METAL_CreateRenderer(SDL_Window *window, SDL_PropertiesID c renderer->SetRenderTarget = METAL_SetRenderTarget; renderer->QueueSetViewport = METAL_QueueSetViewport; renderer->QueueSetDrawColor = METAL_QueueNoOp; - renderer->QueueSetColorScale = METAL_QueueNoOp; renderer->QueueDrawPoints = METAL_QueueDrawPoints; renderer->QueueDrawLines = METAL_QueueDrawLines; renderer->QueueGeometry = METAL_QueueGeometry; diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index c210fa1f8..30be60e0e 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -1251,11 +1251,6 @@ static int GL_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { SDL_Rect *viewport = &data->drawstate.viewport; @@ -1707,7 +1702,6 @@ static SDL_Renderer *GL_CreateRenderer(SDL_Window *window, SDL_PropertiesID crea renderer->SetRenderTarget = GL_SetRenderTarget; renderer->QueueSetViewport = GL_QueueNoOp; renderer->QueueSetDrawColor = GL_QueueNoOp; - renderer->QueueSetColorScale = GL_QueueNoOp; renderer->QueueDrawPoints = GL_QueueDrawPoints; renderer->QueueDrawLines = GL_QueueDrawLines; renderer->QueueGeometry = GL_QueueGeometry; diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 3c7b94f77..9bbd05d0d 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -1238,11 +1238,6 @@ static int GLES2_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { SDL_Rect *viewport = &data->drawstate.viewport; @@ -2188,7 +2183,6 @@ static SDL_Renderer *GLES2_CreateRenderer(SDL_Window *window, SDL_PropertiesID c renderer->SetRenderTarget = GLES2_SetRenderTarget; renderer->QueueSetViewport = GLES2_QueueNoOp; renderer->QueueSetDrawColor = GLES2_QueueNoOp; - renderer->QueueSetColorScale = GLES2_QueueNoOp; renderer->QueueDrawPoints = GLES2_QueueDrawPoints; renderer->QueueDrawLines = GLES2_QueueDrawLines; renderer->QueueGeometry = GLES2_QueueGeometry; diff --git a/src/render/ps2/SDL_render_ps2.c b/src/render/ps2/SDL_render_ps2.c index 3bb6c0826..3af81d173 100644 --- a/src/render/ps2/SDL_render_ps2.c +++ b/src/render/ps2/SDL_render_ps2.c @@ -504,10 +504,6 @@ static int PS2_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v PS2_RenderSetDrawColor(renderer, cmd); break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } case SDL_RENDERCMD_CLEAR: { PS2_RenderClear(renderer, cmd); @@ -697,7 +693,6 @@ static SDL_Renderer *PS2_CreateRenderer(SDL_Window *window, SDL_PropertiesID cre renderer->SetRenderTarget = PS2_SetRenderTarget; renderer->QueueSetViewport = PS2_QueueSetViewport; renderer->QueueSetDrawColor = PS2_QueueNoOp; - renderer->QueueSetColorScale = PS2_QueueNoOp; renderer->QueueDrawPoints = PS2_QueueDrawPoints; renderer->QueueDrawLines = PS2_QueueDrawPoints; renderer->QueueGeometry = PS2_QueueGeometry; diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c index 68fc8ad3a..1d7e60b71 100644 --- a/src/render/psp/SDL_render_psp.c +++ b/src/render/psp/SDL_render_psp.c @@ -1072,11 +1072,6 @@ static int PSP_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { SDL_Rect *viewport = &cmd->data.viewport.rect; @@ -1327,7 +1322,6 @@ SDL_Renderer *PSP_CreateRenderer(SDL_Window *window, SDL_PropertiesID create_pro renderer->SetRenderTarget = PSP_SetRenderTarget; renderer->QueueSetViewport = PSP_QueueNoOp; renderer->QueueSetDrawColor = PSP_QueueNoOp; - renderer->QueueSetColorScale = PSP_QueueNoOp; renderer->QueueDrawPoints = PSP_QueueDrawPoints; renderer->QueueDrawLines = PSP_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = PSP_QueueGeometry; diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c index fbfe2c48a..66e0d0bf2 100644 --- a/src/render/software/SDL_render_sw.c +++ b/src/render/software/SDL_render_sw.c @@ -706,11 +706,6 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_SETVIEWPORT: { drawstate.viewport = &cmd->data.viewport.rect; @@ -1156,7 +1151,6 @@ SDL_Renderer *SW_CreateRendererForSurface(SDL_Surface *surface) renderer->SetRenderTarget = SW_SetRenderTarget; renderer->QueueSetViewport = SW_QueueNoOp; renderer->QueueSetDrawColor = SW_QueueNoOp; - renderer->QueueSetColorScale = SW_QueueNoOp; renderer->QueueDrawPoints = SW_QueueDrawPoints; renderer->QueueDrawLines = SW_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueFillRects = SW_QueueFillRects; diff --git a/src/render/vitagxm/SDL_render_vita_gxm.c b/src/render/vitagxm/SDL_render_vita_gxm.c index acd279d59..959e9ea5c 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm.c +++ b/src/render/vitagxm/SDL_render_vita_gxm.c @@ -249,7 +249,6 @@ SDL_Renderer *VITA_GXM_CreateRenderer(SDL_Window *window, SDL_PropertiesID creat renderer->SetRenderTarget = VITA_GXM_SetRenderTarget; renderer->QueueSetViewport = VITA_GXM_QueueNoOp; renderer->QueueSetDrawColor = VITA_GXM_QueueSetDrawColor; - renderer->QueueSetColorScale = VITA_GXM_QueueNoOp; renderer->QueueDrawPoints = VITA_GXM_QueueDrawPoints; renderer->QueueDrawLines = VITA_GXM_QueueDrawLines; renderer->QueueGeometry = VITA_GXM_QueueGeometry; @@ -1006,11 +1005,6 @@ static int VITA_GXM_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *c break; } - case SDL_RENDERCMD_SETCOLORSCALE: - { - break; - } - case SDL_RENDERCMD_CLEAR: { VITA_GXM_RenderClear(renderer, cmd);