Remove WM_FAST_DRAW ifdef which I added while Ton was on holiday.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 25 Jul 2010 01:39:47 +0000 (01:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 25 Jul 2010 01:39:47 +0000 (01:39 +0000)
Only drawing the areas which need redrawing work so no reason to revert this.

source/blender/editors/screen/area.c
source/blender/editors/screen/screen_intern.h
source/blender/editors/screen/screen_ops.c

index b5a0ad9c81973fdd0c9c5a91d81911c3bd29f41d..a97f8f128b921a444b2439be35709c060ed9d554 100644 (file)
@@ -117,12 +117,6 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note)
                case NC_WINDOW:
                        ED_region_tag_redraw(ar);
                        break;
-#ifndef WM_FAST_DRAW
-               case NC_SCREEN:
-                       if(note->action==NA_EDITED)
-                               ED_region_tag_redraw(ar);
-                       break;
-#endif
        }
 
        if(ar->type && ar->type->listener)
index 5c104521a6021440f7ecfae0c5a3f85c54759a48..79789b1876e0124c57c8334f4835c9c8216dff71 100644 (file)
@@ -58,9 +58,6 @@ void ed_screen_context(const bContext *C, const char *member, bContextDataResult
 void SCREEN_OT_screenshot(struct wmOperatorType *ot);
 void SCREEN_OT_screencast(struct wmOperatorType *ot);
 
-/* partial updates, much faster then drawing everything, ton is away so allow easy undo'ing - campbell */
-#define WM_FAST_DRAW
-
 #endif /* ED_SCREEN_INTERN_H */
 
 
index dd910f8ba9a7083fdc1b51c2066d8f81793a5b8e..c8192996127297210afa1d1b6881400d90c1169c 100644 (file)
@@ -615,10 +615,8 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
                                        return area_swap_cancel(C, op);
                                }
 
-#ifdef WM_FAST_DRAW
                                ED_area_tag_redraw(sad->sa1);
                                ED_area_tag_redraw(sad->sa2);
-#endif
 
                                ED_area_swapspace(C, sad->sa1, sad->sa2);
                                
@@ -691,10 +689,8 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
        
        /* copy area to new screen */
        area_copy_data((ScrArea *)newsc->areabase.first, sa, 0);
-       
-#ifdef WM_FAST_DRAW
+
        ED_area_tag_redraw((ScrArea *)newsc->areabase.first);
-#endif
 
        /* screen, areas init */
        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
@@ -820,6 +816,7 @@ static void area_move_apply_do(bContext *C, int origval, int delta, int dir, int
        wmWindow *win= CTX_wm_window(C);
        bScreen *sc= CTX_wm_screen(C);
        ScrVert *v1;
+       ScrArea *sa;
        
        delta= CLAMPIS(delta, -smaller, bigger);
        
@@ -842,15 +839,12 @@ static void area_move_apply_do(bContext *C, int origval, int delta, int dir, int
                        }
                }
        }
-#ifdef WM_FAST_DRAW
-       {
-               ScrArea *sa;
-               for(sa= sc->areabase.first; sa; sa= sa->next)
-                       if(sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
-                               ED_area_tag_redraw(sa);
+
+       for(sa= sc->areabase.first; sa; sa= sa->next) {
+               if(sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
+                       ED_area_tag_redraw(sa);
        }
 
-#endif
        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); /* redraw everything */
 }
 
@@ -1113,10 +1107,9 @@ static int area_split_apply(bContext *C, wmOperator *op)
                if(dir=='h') sd->origval= sd->nedge->v1->vec.y;
                else sd->origval= sd->nedge->v1->vec.x;
 
-#ifdef WM_FAST_DRAW
                ED_area_tag_redraw(sd->sarea);
                ED_area_tag_redraw(sd->narea);
-#endif
+
                WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
                
                return 1;
@@ -1128,11 +1121,9 @@ static int area_split_apply(bContext *C, wmOperator *op)
 static void area_split_exit(bContext *C, wmOperator *op)
 {
        if (op->customdata) {
-#ifdef WM_FAST_DRAW
                sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
                if(sd->sarea) ED_area_tag_redraw(sd->sarea);
                if(sd->narea) ED_area_tag_redraw(sd->narea);
-#endif
 
                MEM_freeN(op->customdata);
                op->customdata = NULL;
@@ -1444,9 +1435,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
                                else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
                                        ED_region_toggle_hidden(C, rmd->ar);
                        }
-#ifdef WM_FAST_DRAW
                        ED_area_tag_redraw(rmd->sa);
-#endif
                        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
                        
                        break;
@@ -1457,9 +1446,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
                                if(ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
                                        if(rmd->ar->flag & RGN_FLAG_HIDDEN) {
                                                ED_region_toggle_hidden(C, rmd->ar);
-#ifdef WM_FAST_DRAW
                                                ED_area_tag_redraw(rmd->sa);
-#endif
                                                WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
                                        }
                                }
@@ -1962,10 +1949,9 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
                        break;
                case LEFTMOUSE:
                        if(event->val==KM_RELEASE) {
-#ifdef WM_FAST_DRAW
                                ED_area_tag_redraw(jd->sa1);
                                ED_area_tag_redraw(jd->sa2);
-#endif
+
                                area_join_apply(C, op);
                                WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
                                area_join_exit(C, op);
@@ -2148,9 +2134,7 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
                                MEM_freeN(ar);
                        }
                }
-#ifdef WM_FAST_DRAW
                ED_area_tag_redraw(sa);
-#endif
                WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
        }
        else if(ar->next)
@@ -2190,10 +2174,7 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
                        rv3d->view= RV3D_VIEW_CAMERA; rv3d->persp= RV3D_CAMOB;
                        if (rv3d->localvd) {rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; }
                }
-               
-#ifdef WM_FAST_DRAW
                ED_area_tag_redraw(sa);
-#endif
                WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
        }
        
@@ -2235,10 +2216,8 @@ static int region_flip_exec(bContext *C, wmOperator *op)
                ar->alignment= RGN_ALIGN_RIGHT;
        else if(ar->alignment==RGN_ALIGN_RIGHT)
                ar->alignment= RGN_ALIGN_LEFT;
-       
-#ifdef WM_FAST_DRAW
-               ED_area_tag_redraw(CTX_wm_area(C));
-#endif
+
+       ED_area_tag_redraw(CTX_wm_area(C));
        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
        
        return OPERATOR_FINISHED;
@@ -2290,10 +2269,8 @@ static int header_flip_exec(bContext *C, wmOperator *op)
                ar->alignment= RGN_ALIGN_RIGHT;
        else if(ar->alignment==RGN_ALIGN_RIGHT)
                ar->alignment= RGN_ALIGN_LEFT;
-       
-#ifdef WM_FAST_DRAW
+
        ED_area_tag_redraw(CTX_wm_area(C));
-#endif
 
        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);