Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 1,157 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Use for select and depth-drawing. | * Use for select and depth-drawing. | ||||
| */ | */ | ||||
| static void drw_engines_enable_basic(void) | static void drw_engines_enable_basic(void) | ||||
| { | { | ||||
| use_drw_engine(&draw_engine_basic_type); | use_drw_engine(&draw_engine_basic_type); | ||||
| } | } | ||||
| static void drw_engine_enable_image_editor(void) | |||||
| { | |||||
| if (DRW_engine_external_use_for_image_editor()) { | |||||
| use_drw_engine(&draw_engine_external_type); | |||||
| } | |||||
| else { | |||||
| use_drw_engine(&draw_engine_image_type); | |||||
| } | |||||
| use_drw_engine(&draw_engine_overlay_type); | |||||
| } | |||||
| static void drw_engines_enable_editors(void) | static void drw_engines_enable_editors(void) | ||||
| { | { | ||||
| SpaceLink *space_data = DST.draw_ctx.space_data; | SpaceLink *space_data = DST.draw_ctx.space_data; | ||||
| if (!space_data) { | if (!space_data) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (space_data->spacetype == SPACE_IMAGE) { | if (space_data->spacetype == SPACE_IMAGE) { | ||||
| use_drw_engine(&draw_engine_image_type); | drw_engine_enable_image_editor(); | ||||
| use_drw_engine(&draw_engine_overlay_type); | |||||
| } | } | ||||
| else if (space_data->spacetype == SPACE_NODE) { | else if (space_data->spacetype == SPACE_NODE) { | ||||
| /* Only enable when drawing the space image backdrop. */ | /* Only enable when drawing the space image backdrop. */ | ||||
| SpaceNode *snode = (SpaceNode *)space_data; | SpaceNode *snode = (SpaceNode *)space_data; | ||||
| if ((snode->flag & SNODE_BACKDRAW) != 0) { | if ((snode->flag & SNODE_BACKDRAW) != 0) { | ||||
| use_drw_engine(&draw_engine_image_type); | use_drw_engine(&draw_engine_image_type); | ||||
| use_drw_engine(&draw_engine_overlay_type); | use_drw_engine(&draw_engine_overlay_type); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,025 Lines • Show Last 20 Lines | |||||