Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_draw.c
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "GHOST_C-api.h" | #include "GHOST_C-api.h" | ||||
| #include "ED_node.h" | #include "ED_node.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #include "GPU_context.h" | |||||
| #include "GPU_draw.h" | #include "GPU_draw.h" | ||||
| #include "GPU_framebuffer.h" | #include "GPU_framebuffer.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "GPU_state.h" | #include "GPU_state.h" | ||||
| #include "GPU_texture.h" | #include "GPU_texture.h" | ||||
| #include "GPU_viewport.h" | #include "GPU_viewport.h" | ||||
| #include "RE_engine.h" | #include "RE_engine.h" | ||||
| ▲ Show 20 Lines • Show All 932 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void wm_draw_update(bContext *C) | void wm_draw_update(bContext *C) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| wmWindow *win; | wmWindow *win; | ||||
| GPU_context_main_lock(); | |||||
| GPU_free_unused_buffers(); | GPU_free_unused_buffers(); | ||||
| for (win = wm->windows.first; win; win = win->next) { | for (win = wm->windows.first; win; win = win->next) { | ||||
| #ifdef WIN32 | #ifdef WIN32 | ||||
| GHOST_TWindowState state = GHOST_GetWindowState(win->ghostwin); | GHOST_TWindowState state = GHOST_GetWindowState(win->ghostwin); | ||||
| if (state == GHOST_kWindowStateMinimized) { | if (state == GHOST_kWindowStateMinimized) { | ||||
| /* do not update minimized windows, gives issues on Intel (see T33223) | /* do not update minimized windows, gives issues on Intel (see T33223) | ||||
| Show All 21 Lines | if (wm_draw_update_test_window(bmain, C, win)) { | ||||
| wm_window_swap_buffers(win); | wm_window_swap_buffers(win); | ||||
| } | } | ||||
| } | } | ||||
| CTX_wm_window_set(C, NULL); | CTX_wm_window_set(C, NULL); | ||||
| /* Draw non-windows (surfaces) */ | /* Draw non-windows (surfaces) */ | ||||
| wm_surfaces_iter(C, wm_draw_surface); | wm_surfaces_iter(C, wm_draw_surface); | ||||
| GPU_context_main_unlock(); | |||||
| } | } | ||||
| void wm_draw_region_clear(wmWindow *win, ARegion *UNUSED(region)) | void wm_draw_region_clear(wmWindow *win, ARegion *UNUSED(region)) | ||||
| { | { | ||||
| bScreen *screen = WM_window_get_active_screen(win); | bScreen *screen = WM_window_get_active_screen(win); | ||||
| screen->do_draw = true; | screen->do_draw = true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines | |||||