From: Jean-Philippe Bruyère Date: Sun, 30 Oct 2022 06:57:26 +0000 (+0100) Subject: surf and pattern status check when affecting to context X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=aabfb40464b83702bdfc0cfe5520d6519bd6dd17;p=jp%2Fvkvg.git surf and pattern status check when affecting to context --- diff --git a/src/vkvg_context.c b/src/vkvg_context.c index a7738b9..deee2d0 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -1043,7 +1043,7 @@ void vkvg_set_source_rgba (VkvgContext ctx, float r, float g, float b, float a) _update_cur_pattern (ctx, NULL); } void vkvg_set_source_surface(VkvgContext ctx, VkvgSurface surf, float x, float y){ - if (ctx->status) + if (ctx->status || surf->status) return; RECORD(ctx, VKVG_CMD_SET_SOURCE_SURFACE, x, y, surf); ctx->pushConsts.source.x = x; @@ -1052,7 +1052,7 @@ void vkvg_set_source_surface(VkvgContext ctx, VkvgSurface surf, float x, float y ctx->pushCstDirty = true; } void vkvg_set_source (VkvgContext ctx, VkvgPattern pat){ - if (ctx->status) + if (ctx->status || pat->status) return; RECORD(ctx, VKVG_CMD_SET_SOURCE, pat); _update_cur_pattern (ctx, pat);