ati_2d_blt remains the public interface to the blitter but the bulk of
the implementation is moved down into ati_2d_do_blt which is passed an
ATI2DCtx.
Signed-off-by: Chad Jablonski <chad@jablonski.xyz>
---
hw/display/ati_2d.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
index 525f20d83f..4216986b6a 100644
--- a/hw/display/ati_2d.c
+++ b/hw/display/ati_2d.c
@@ -121,15 +121,12 @@ static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx)
(ctx->top_to_bottom ? 'v' : '^'));
}
-void ati_2d_blt(ATIVGAState *s)
+static void ati_2d_do_blt(ATIVGAState *s, ATI2DCtx *ctx)
{
/* FIXME it is probably more complex than this and may need to be */
/* rewritten but for now as a start just to get some output: */
bool use_pixman_fill = s->use_pixman & BIT(0);
bool use_pixman_blt = s->use_pixman & BIT(1);
- ATI2DCtx ctx_;
- ATI2DCtx *ctx = &ctx_;
- setup_2d_blt_ctx(s, ctx);
if (!ctx->bpp) {
qemu_log_mask(LOG_GUEST_ERROR, "Invalid bpp\n");
return;
@@ -275,3 +272,10 @@ void ati_2d_blt(ATIVGAState *s)
ati_set_dirty(&s->vga, ctx);
}
+
+void ati_2d_blt(ATIVGAState *s)
+{
+ ATI2DCtx ctx;
+ setup_2d_blt_ctx(s, &ctx);
+ ati_2d_do_blt(s, &ctx);
+}
--
2.52.0