diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-12-29 20:01:25 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-12 22:20:34 +0100 |
| commit | 80e9cd4e91f93df0e53e6fa75af4c2e2f8e388f2 (patch) | |
| tree | 0f9b2c474cb279f045bc56f285c6754fd46fe3f7 | |
| parent | f56e07d215812fca11dcde5acf69c16159294219 (diff) | |
don't flush context on restore if no clipping info is stored
| -rw-r--r-- | src/vkvg_context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c index 7fd0f95..a0b6e3a 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -1262,14 +1262,11 @@ void vkvg_restore (VkvgContext ctx){ LOG(VKVG_LOG_INFO, "RESTORE CONTEXT: ctx = %p\n", ctx); - _flush_cmd_buff (ctx); - if (!_wait_flush_fence (ctx)) - return; - vkvg_context_save_t* sav = ctx->pSavedCtxs; ctx->pSavedCtxs = sav->pNext; ctx->pushConsts = sav->pushConsts; + ctx->pushCstDirty = true; /*if (sav->pattern) _update_cur_pattern (ctx, sav->pattern);*/ @@ -1278,6 +1275,9 @@ void vkvg_restore (VkvgContext ctx){ if (!ctx->curSavBit) {//no clipping state has been saved, clipping has to be reseted vkvg_reset_clip (ctx); } else { + _flush_cmd_buff (ctx); + if (!_wait_flush_fence (ctx)) + return; uint8_t curSaveBit = 1 << ((ctx->curSavBit-1) % 6 + 2); |