diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-13 17:32:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-13 17:32:42 +0400 |
commit | 2914d152411cc1dda353f0806d0f579e9c471730 (patch) | |
tree | f8fb08b3c3fc875eb5f84cc90f8d2ea43c434ed0 /source/blender/windowmanager | |
parent | 51c615e1bc40cccea21be332fad5c236d00cff9c (diff) |
Fix #35337: sculpt performance regression, partial redraw was not working anymore
due to paint cursor redraw problem.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 166aef48ec7..cfa914091f1 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -63,6 +63,7 @@ struct wmDropBox; struct wmDrag; struct ImBuf; struct ImageFormatData; +struct ARegion; typedef struct wmJob wmJob; @@ -130,6 +131,7 @@ void *WM_paint_cursor_activate(struct wmWindowManager *wm, void *customdata); void WM_paint_cursor_end(struct wmWindowManager *wm, void *handle); +void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *ar); void WM_cursor_warp (struct wmWindow *win, int x, int y); float WM_cursor_pressure (const struct wmWindow *win); diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 005d02647a4..438004b5d76 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -798,6 +798,12 @@ void wm_tag_redraw_overlay(wmWindow *win, ARegion *ar) } } +void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *ar) +{ + win->screen->do_draw_paintcursor = TRUE; + wm_tag_redraw_overlay(win, ar); +} + void wm_draw_update(bContext *C) { wmWindowManager *wm = CTX_wm_manager(C); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index f79ac1c9083..89dc6ccc038 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2002,8 +2002,7 @@ static void wm_paintcursor_tag(bContext *C, wmPaintCursor *pc, ARegion *ar) for (; pc; pc = pc->next) { if (pc->poll == NULL || pc->poll(C)) { wmWindow *win = CTX_wm_window(C); - win->screen->do_draw_paintcursor = TRUE; - wm_tag_redraw_overlay(win, ar); + WM_paint_cursor_tag_redraw(win, ar); } } } |