Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-04-25 17:35:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-25 17:35:08 +0300
commitacf07e73666a4a3edaeeb36489902b9373a9779d (patch)
treebe9893c779d1fcbda25e688e3dc6da0f4cadc627 /source/blender/draw/modes/edit_curve_mode.c
parent75a759ea5e9a4b4a52900e6383d67c81b7cbdabe (diff)
Draw Manager: store context vars per draw
Was performing context access per object for scene, region etc. While not very slow they don't change during drawing so cache in a struct. This also makes it possible to draw in views besides the current context.
Diffstat (limited to 'source/blender/draw/modes/edit_curve_mode.c')
-rw-r--r--source/blender/draw/modes/edit_curve_mode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c
index 3e316293a57..f2834bfb0ec 100644
--- a/source/blender/draw/modes/edit_curve_mode.c
+++ b/source/blender/draw/modes/edit_curve_mode.c
@@ -212,9 +212,9 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob)
{
EDIT_CURVE_PassList *psl = ((EDIT_CURVE_Data *)vedata)->psl;
EDIT_CURVE_StorageList *stl = ((EDIT_CURVE_Data *)vedata)->stl;
- const struct bContext *C = DRW_get_context();
- Scene *scene = CTX_data_scene(C);
- Object *obedit = scene->obedit;
+ const DRWContextState *draw_ctx = DRW_context_state_get();
+ const Scene *scene = draw_ctx->scene;
+ const Object *obedit = scene->obedit;
UNUSED_VARS(psl, stl);