Removed SDL_RENDERCMD_SETCOLORSCALE, which ended up being a noop on all renderers
parent
54c2ba6afd
commit
0f973f3eb4
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue