diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/DRW_engine.h | 1 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 50 |
2 files changed, 0 insertions, 51 deletions
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h index 13bf5426a5d..e300bcad8bf 100644 --- a/source/blender/draw/DRW_engine.h +++ b/source/blender/draw/DRW_engine.h @@ -89,7 +89,6 @@ typedef struct DRWUpdateContext { struct RenderEngineType *engine_type; } DRWUpdateContext; void DRW_notify_view_update(const DRWUpdateContext *update_ctx); -void DRW_notify_id_update(const DRWUpdateContext *update_ctx, struct ID *id); typedef enum eDRWSelectStage { DRW_SELECT_PASS_PRE = 1, DRW_SELECT_PASS_POST, } eDRWSelectStage; diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 196f817a636..e1f4cdacdb4 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1085,56 +1085,6 @@ void DRW_notify_view_update(const DRWUpdateContext *update_ctx) /** \} */ -/** \name ID Update - * \{ */ - -/* TODO(sergey): This code is run for each changed ID (including the ones which - * are changed indirectly via update flush. Need to find a way to make this to - * run really fast, hopefully without any memory allocations on a heap - * Idea here could be to run every known engine's id_update() and make them - * do nothing if there is no engine-specific data yet. - */ -void DRW_notify_id_update(const DRWUpdateContext *update_ctx, ID *id) -{ - RenderEngineType *engine_type = update_ctx->engine_type; - ARegion *ar = update_ctx->ar; - View3D *v3d = update_ctx->v3d; - RegionView3D *rv3d = ar->regiondata; - Depsgraph *depsgraph = update_ctx->depsgraph; - Scene *scene = update_ctx->scene; - ViewLayer *view_layer = update_ctx->view_layer; - - /* Separate update for each stereo view. */ - for (int view = 0; view < 2; view++) { - GPUViewport *viewport = WM_draw_region_get_viewport(ar, view); - if (!viewport) { - continue; - } - - /* Reset before using it. */ - drw_state_prepare_clean_for_draw(&DST); - DST.viewport = viewport; - DST.draw_ctx = (DRWContextState){ - .ar = ar, .rv3d = rv3d, .v3d = v3d, - .scene = scene, .view_layer = view_layer, .obact = OBACT(view_layer), - .engine_type = engine_type, - .depsgraph = depsgraph, .object_mode = OB_MODE_OBJECT, - }; - drw_engines_enable(view_layer, engine_type); - for (LinkData *link = DST.enabled_engines.first; link; link = link->next) { - DrawEngineType *draw_engine = link->data; - ViewportEngineData *data = drw_viewport_engine_data_ensure(draw_engine); - if (draw_engine->id_update) { - draw_engine->id_update(data, id); - } - } - DST.viewport = NULL; - drw_engines_disable(); - } -} - -/** \} */ - /* -------------------------------------------------------------------- */ /** \name Main Draw Loops (DRW_draw) |