Remove FillRects from back-end, where RenderGeometry can be used
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index 88824e4..fde0e0a 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -2388,7 +2388,6 @@ D3D11_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->QueueSetDrawColor = D3D11_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
renderer->QueueDrawPoints = D3D11_QueueDrawPoints;
renderer->QueueDrawLines = D3D11_QueueDrawPoints; /* lines and points queue vertices the same way. */
- renderer->QueueFillRects = D3D11_QueueFillRects;
renderer->QueueGeometry = D3D11_QueueGeometry;
renderer->RunCommandQueue = D3D11_RunCommandQueue;
renderer->RenderReadPixels = D3D11_RenderReadPixels;
diff --git a/src/render/vitagxm/SDL_render_vita_gxm.c b/src/render/vitagxm/SDL_render_vita_gxm.c
index 514541e..b214be8 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm.c
@@ -93,8 +93,6 @@ static int VITA_GXM_RenderDrawPoints(SDL_Renderer *renderer, const SDL_RenderCom
static int VITA_GXM_RenderDrawLines(SDL_Renderer *renderer, const SDL_RenderCommand *cmd);
-static int VITA_GXM_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count);
-
static int VITA_GXM_RenderFillRects(SDL_Renderer *renderer, const SDL_RenderCommand *cmd);
@@ -244,7 +242,6 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
renderer->QueueSetDrawColor = VITA_GXM_QueueSetDrawColor;
renderer->QueueDrawPoints = VITA_GXM_QueueDrawPoints;
renderer->QueueDrawLines = VITA_GXM_QueueDrawLines;
- renderer->QueueFillRects = VITA_GXM_QueueFillRects;
renderer->QueueGeometry = VITA_GXM_QueueGeometry;
renderer->RunCommandQueue = VITA_GXM_RunCommandQueue;
renderer->RenderReadPixels = VITA_GXM_RenderReadPixels;
@@ -510,47 +507,6 @@ VITA_GXM_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const S
}
static int
-VITA_GXM_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
-{
- int color;
- color_vertex *vertices;
- VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
-
- cmd->data.draw.count = count;
- color = data->drawstate.color;
-
- vertices = (color_vertex *)pool_memalign(
- data,
- 4 * count * sizeof(color_vertex), // 4 vertices * count
- sizeof(color_vertex));
-
- for (int i =0; i < count; i++)
- {
- const SDL_FRect *rect = &rects[i];
-
- vertices[4*i+0].x = rect->x;
- vertices[4*i+0].y = rect->y;
- vertices[4*i+0].color = color;
-
- vertices[4*i+1].x = rect->x + rect->w;
- vertices[4*i+1].y = rect->y;
- vertices[4*i+1].color = color;
-
- vertices[4*i+2].x = rect->x;
- vertices[4*i+2].y = rect->y + rect->h;
- vertices[4*i+2].color = color;
-
- vertices[4*i+3].x = rect->x + rect->w;
- vertices[4*i+3].y = rect->y + rect->h;
- vertices[4*i+3].color = color;
- }
-
- cmd->data.draw.first = (size_t)vertices;
-
- return 0;
-}
-
-static int
VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride,
int num_vertices, const void *indices, int num_indices, int size_indices,
@@ -887,11 +843,8 @@ VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *
break;
}
- case SDL_RENDERCMD_FILL_RECTS: {
- SetDrawState(data, cmd);
- VITA_GXM_RenderFillRects(renderer, cmd);
+ case SDL_RENDERCMD_FILL_RECTS: /* unused */
break;
- }
case SDL_RENDERCMD_COPY: /* unused */
break;