Blender Git Loki

Git Commits -> Revision e490dc4

Revision e490dc4 by Konrad Puklicki (master)
May 27, 2020, 10:06 (GMT)
UI: Skip unnecessary cursor setting

Currently, in sculpting, weight paint and vertex paint modes every cursor
movement triggers redraw of a brush. During that redraw, native cursor is set.
Under the hood, setting the cursor causes freeing of previous cursor and
allocating a new one. In most cases, in previously mentioned modes, recreating
cursor is unnecessary since cursor stays the same.

This patch adds a check which skips cursor change if requested cursor is
already set. The check could be added in pain_cursor.c, but I felt adding it
inside WM_cursor_set function would hopefully skip more unnecessary cursor
reallocations.

Differential Revision: https://developer.blender.org/D7828

Reviewed by: Julian Eisel

Commit Details:

Full Hash: e490dc4346dba5f29dada59ef421dfff499d65a9
Parent Commit: bab5fbb
Committed By: Julian Eisel
Lines Changed: +10, -6

1 Modified Path:

/source/blender/windowmanager/intern/wm_cursors.c (+10, -6) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021