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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-09 14:20:25 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-09 15:03:25 +0300
commitdb45aaafab8cc821b0e06a659de44f5fedbf847b (patch)
tree51a2a056319fc145e973f4882e3c15660a09e303 /source/blender/windowmanager
parent89c762dd991c64fa46803b3459a2197e25b6138a (diff)
Fix T61474: laggy interaction on Windows/NVIDIA when gizmos are visible
Thanks to Sergey and Clément for helping to track this down.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 1c5fda2ec11..534474a6221 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -552,6 +552,9 @@ static int gizmo_find_intersected_3d_intern(wmGizmo **visible_gizmos,
bool use_select_bias = false;
+ /* TODO: waiting for the GPU in the middle of the event loop for every
+ * mouse move is bad for performance, we need to find a solution to not
+ * use the GPU or draw something once. (see T61474) */
GPU_select_begin(buffer, ARRAY_SIZE(buffer), &rect, GPU_SELECT_NEAREST_FIRST_PASS, 0);
/* do the drawing */
gizmo_draw_select_3d_loop(C, visible_gizmos, visible_gizmos_len, &use_select_bias);
@@ -644,7 +647,7 @@ static wmGizmo *gizmo_find_intersected_3d(bContext *C,
break;
}
}
- else {
+ else if (gz->type->draw_select != NULL) {
has_3d = true;
}
}