diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-10-30 07:57:26 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2023-03-01 18:56:44 +0100 |
| commit | aabfb40464b83702bdfc0cfe5520d6519bd6dd17 (patch) | |
| tree | dde49e139b0b0c0dcbb201f60b30d3a77052394c | |
| parent | 84cf72ddbeb6a38175ec04a1afc948373518086b (diff) | |
surf and pattern status check when affecting to context
| -rw-r--r-- | src/vkvg_context.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |