diff options
author | Antonioya <blendergit@gmail.com> | 2019-02-24 19:00:12 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-02-24 19:00:12 +0300 |
commit | 5d7ce96b5df1851a559c84907ea0cd935a0be267 (patch) | |
tree | f01fb594bfe132d35d2879db82955883f5804aaf /source | |
parent | ccfda7dc2c5d7fe26f0461df2c8209fa6698f9c3 (diff) |
GP: Don't set cache as dirty with Onion
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 7 | ||||
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index c99c7befa32..f6702f6f56b 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -185,13 +185,6 @@ static bool gpencil_batch_cache_valid(GpencilBatchCache *cache, bGPdata *gpd, in gpd->flag &= ~GP_DATA_PYTHON_UPDATED; valid = false; } - else if (DRW_gpencil_onion_active(gpd)) { - /* if onion, set as dirty always - * This reduces performance, but avoid any crash in the multiple - * overlay and multiwindow options and keep all windows working - */ - valid = false; - } else if (cache->is_editmode) { valid = false; } diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 816bc554bc7..c2932b34b65 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -65,6 +65,10 @@ static void gpencil_calc_vertex( GpencilBatchCache *cache, bGPdata *gpd, int cfra_eval) { + if (!cache->is_dirty) { + return; + } + Object *ob = cache_ob->ob; const DRWContextState *draw_ctx = DRW_context_state_get(); const bool main_onion = draw_ctx->v3d != NULL ? (draw_ctx->v3d->gp_flag & V3D_GP_SHOW_ONION_SKIN) : true; |