diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2026-06-24 13:46:54 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2026-09-04 11:06:23 +0200 |
| commit | 695b53939f5528d7a44d85d53029efb2fc28df9d (patch) | |
| tree | 3223f0b0560c7aed78baa839ca6293cd65c86359 | |
| parent | f6283839a7421755dbf31d6de2bba684e7d11887 (diff) | |
vkvg_save: wait only if stencil must be saved
| -rw-r--r-- | src/vkvg_context.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c index 898a061..0abe993 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -1389,13 +1389,12 @@ void vkvg_restore(VkvgContext ctx) { ctx->pSavedCtxs = sav->pNext; _flush_cmd_buff(ctx); - if (!_wait_ctx_flush_end(ctx)) - return; - - ctx->pushConsts = sav->pushConsts; - ctx->pushCstDirty = true; if (ctx->curClipState) { //!=none + + if (!_wait_ctx_flush_end(ctx)) + return; + if (ctx->curClipState == vkvg_clip_state_clip && sav->clippingState == vkvg_clip_state_clear) { _reset_clip(ctx); } else { @@ -1473,6 +1472,9 @@ void vkvg_restore(VkvgContext ctx) { } } + ctx->pushConsts = sav->pushConsts; + ctx->pushCstDirty = true; + ctx->curClipState = vkvg_clip_state_none; ctx->dashOffset = sav->dashOffset; |