]> O.S.I.I.S - jp/vkvg.git/commitdiff
wip
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 20 Jan 2022 01:20:07 +0000 (02:20 +0100)
committerj-p <jp_bruyere@hotmail.com>
Fri, 18 Feb 2022 20:09:23 +0000 (21:09 +0100)
src/vkvg_context.c

index 74a00bfc9732dec76dc18629837bd298be274751..92c89b96b0123cafb6e7ee4ef91ffc0ebe26826d 100644 (file)
@@ -76,6 +76,9 @@ void _init_ctx (VkvgContext ctx) {
        ctx->currentFont = NULL;
        ctx->selectedFontName[0] = 0;
        ctx->pattern = NULL;
+       ctx->cmdStarted = false;
+       ctx->curClipState = vkvg_clip_state_none;
+       ctx->vertCount = ctx->indCount = ctx->curColor = 0;
        /*ctx->pPrev = ctx->dev->lastCtx;
        if (ctx->pPrev != NULL)
                ctx->pPrev->pNext = ctx;
@@ -93,11 +96,7 @@ VkvgContext vkvg_create(VkvgSurface surf)
                _update_descriptor_set (ctx, surf->dev->emptyImg, ctx->dsSrc);
                _clear_path     (ctx);
                ctx->cmd = ctx->cmdBuffers[0];//current recording buffer
-               ctx->cmdStarted = false;
-               ctx->curClipState = vkvg_clip_state_none;
                ctx->status = VKVG_STATUS_SUCCESS;
-               ctx->vertCount = ctx->indCount = ctx->curColor = 0;
-
                return ctx;
        }
        VkvgContext ctx = (vkvg_context*)calloc(1, sizeof(vkvg_context));