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
path: root/source
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-09-18 15:44:44 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-09-18 15:44:44 +0300
commitd370e6c3eae84893f3a65e59d892110d1e974fce (patch)
tree04bfb91bcf7361dfbba0e9f3a6282d7cd5ec7f01 /source
parent4c1ee477070083f12bf802e551b14179e0c4579a (diff)
parentd0d9360a6663efb16e4fbc35554be61bf54630e3 (diff)
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_render.c6
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c20
2 files changed, 9 insertions, 17 deletions
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 130dbad8b93..83e9d55c3df 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -45,6 +45,7 @@
#include "RE_engine.h"
#include "RE_pipeline.h"
+#include "ED_render.h"
/* Deprecated, only provided for API compatibility. */
EnumPropertyItem rna_enum_render_pass_type_items[] = {
@@ -298,7 +299,7 @@ static void engine_update_render_passes(RenderEngine *engine, struct Scene *scen
/* RenderEngine registration */
-static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
+static void rna_RenderEngine_unregister(Main *bmain, StructRNA *type)
{
RenderEngineType *et = RNA_struct_blender_type_get(type);
@@ -308,6 +309,9 @@ static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
RNA_struct_free_extension(type, &et->ext);
RNA_struct_free(&BLENDER_RNA, type);
BLI_freelinkN(&R_engines, et);
+
+ /* Stop all renders in case we were using this one. */
+ ED_render_engine_changed(bmain);
}
static StructRNA *rna_RenderEngine_register(
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 7cff598e6ad..81f913d7aa7 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -869,25 +869,13 @@ static bool wm_draw_update_test_window(wmWindow *win)
static int wm_automatic_draw_method(wmWindow *win)
{
- /* Ideally all cards would work well with triple buffer, since if it works
- * well gives the least redraws and is considerably faster at partial redraw
- * for sculpting or drawing overlapping menus. For typically lower end cards
- * copy to texture is slow though and so we use overlap instead there. */
-
+ /* We assume all supported GPUs now support triple buffer well. */
if (win->drawmethod == USER_DRAW_AUTOMATIC) {
- /* Windows software driver darkens color on each redraw */
- if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
- return USER_DRAW_OVERLAP_FLIP;
- else if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_UNIX, GPU_DRIVER_SOFTWARE))
- return USER_DRAW_OVERLAP;
- /* drawing lower color depth again degrades colors each time */
- else if (GPU_color_depth() < 24)
- return USER_DRAW_OVERLAP;
- else
- return USER_DRAW_TRIPLE;
+ return USER_DRAW_TRIPLE;
}
- else
+ else {
return win->drawmethod;
+ }
}
bool WM_is_draw_triple(wmWindow *win)