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:
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c1
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c20
-rw-r--r--source/creator/creator.c8
4 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 66812efdf3f..24d54bae1fa 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -486,6 +486,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DRAW_OVERLAP 1
#define USER_DRAW_FULL 2
#define USER_DRAW_AUTOMATIC 3
+#define USER_DRAW_OVERLAP_FLIP 4
/* tw_flag (transform widget) */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index fc677d9d6f7..a83ff71378f 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2170,6 +2170,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically set based on graphics card and driver."},
{USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory."},
{USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws."},
+ {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, "Overlap Flip", "Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)."},
{USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails."},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 0bbd3757f27..9372e49597d 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -180,14 +180,13 @@ static void wm_flush_regions_up(bScreen *screen, rcti *dirty)
}
}
-static void wm_method_draw_overlap_all(bContext *C, wmWindow *win)
+static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange)
{
wmWindowManager *wm= CTX_wm_manager(C);
bScreen *screen= win->screen;
ScrArea *sa;
ARegion *ar;
static rcti rect= {0, 0, 0, 0};
- int exchange= (G.f & G_SWAP_EXCHANGE);
/* flush overlapping regions */
if(screen->regionbase.first) {
@@ -400,7 +399,7 @@ static void wm_draw_triple_fail(bContext *C, wmWindow *win)
wm_draw_window_clear(win);
win->drawfail= 1;
- wm_method_draw_overlap_all(C, win);
+ wm_method_draw_overlap_all(C, win, 0);
}
static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
@@ -688,22 +687,23 @@ void wm_draw_update(bContext *C)
ED_screen_refresh(wm, win);
if(win->drawfail)
- wm_method_draw_overlap_all(C, win);
+ wm_method_draw_overlap_all(C, win, 0);
else if(win->drawmethod == USER_DRAW_AUTOMATIC) {
/* ATI opensource driver is known to be very slow at this,
Windows software driver darkens color on each redraw */
- if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) ||
- GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
- wm_method_draw_overlap_all(C, win);
+ if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE))
+ wm_method_draw_overlap_all(C, win, 0);
+ else if(GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
+ wm_method_draw_overlap_all(C, win, 1);
else
wm_method_draw_triple(C, win);
}
else if(win->drawmethod == USER_DRAW_FULL)
wm_method_draw_full(C, win);
else if(win->drawmethod == USER_DRAW_OVERLAP)
- wm_method_draw_overlap_all(C, win);
- /*else if(win->drawmethod == USER_DRAW_DAMAGE)
- wm_method_draw_damage(C, win);*/
+ wm_method_draw_overlap_all(C, win, 0);
+ else if(win->drawmethod == USER_DRAW_OVERLAP_FLIP)
+ wm_method_draw_overlap_all(C, win, 1);
else // if(win->drawmethod == USER_DRAW_TRIPLE)
wm_method_draw_triple(C, win);
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 1e002869853..6244032bbcf 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -372,13 +372,6 @@ static int prefsize(int argc, char **argv, void *data)
return 4;
}
-static int swap_exchange(int argc, char **argv, void *data)
-{
- G.f |= G_SWAP_EXCHANGE;
-
- return 0;
-}
-
static int with_borders(int argc, char **argv, void *data)
{
/* with borders XXX OLD CRUFT!*/
@@ -846,7 +839,6 @@ void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
/* second pass: custom window stuff */
BLI_argsAdd(ba, "-p", 2, prefsize, NULL);
- BLI_argsAdd(ba, "-E", 2, swap_exchange, NULL);
BLI_argsAdd(ba, "-w", 2, with_borders, NULL);
BLI_argsAdd(ba, "-W", 2, without_borders, NULL);
BLI_argsAdd(ba, "-R", 2, register_extension, ba);