diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 234 |
1 files changed, 117 insertions, 117 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 94df54dcdfc..3bf8a3ddf43 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -78,14 +78,14 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar) { wmWindowManager *wm= CTX_wm_manager(C); - if(wm->paintcursors.first) { + if (wm->paintcursors.first) { wmWindow *win= CTX_wm_window(C); bScreen *screen= win->screen; wmPaintCursor *pc; - if(screen->subwinactive == ar->swinid) { - for(pc= wm->paintcursors.first; pc; pc= pc->next) { - if(pc->poll == NULL || pc->poll(C)) { + if (screen->subwinactive == ar->swinid) { + for (pc= wm->paintcursors.first; pc; pc= pc->next) { + if (pc->poll == NULL || pc->poll(C)) { ARegion *ar_other= CTX_wm_region(C); if (ELEM(win->grabcursor, GHOST_kGrabWrap, GHOST_kGrabHide)) { int x = 0, y = 0; @@ -111,13 +111,13 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar) static void wm_area_mark_invalid_backbuf(ScrArea *sa) { - if(sa->spacetype == SPACE_VIEW3D) + if (sa->spacetype == SPACE_VIEW3D) ((View3D*)sa->spacedata.first)->flag |= V3D_INVALID_BACKBUF; } static int wm_area_test_invalid_backbuf(ScrArea *sa) { - if(sa->spacetype == SPACE_VIEW3D) + if (sa->spacetype == SPACE_VIEW3D) return (((View3D*)sa->spacedata.first)->flag & V3D_INVALID_BACKBUF); else return 1; @@ -125,11 +125,11 @@ static int wm_area_test_invalid_backbuf(ScrArea *sa) static void wm_region_test_render_do_draw(ScrArea *sa, ARegion *ar) { - if(sa->spacetype == SPACE_VIEW3D) { + if (sa->spacetype == SPACE_VIEW3D) { RegionView3D *rv3d = ar->regiondata; RenderEngine *engine = (rv3d)? rv3d->render_engine: NULL; - if(engine && (engine->flag & RE_ENGINE_DO_DRAW)) { + if (engine && (engine->flag & RE_ENGINE_DO_DRAW)) { ar->do_draw = 1; engine->flag &= ~RE_ENGINE_DO_DRAW; } @@ -146,11 +146,11 @@ static void wm_method_draw_full(bContext *C, wmWindow *win) ARegion *ar; /* draw area regions */ - for(sa= screen->areabase.first; sa; sa= sa->next) { + for (sa= screen->areabase.first; sa; sa= sa->next) { CTX_wm_area_set(C, sa); - for(ar=sa->regionbase.first; ar; ar= ar->next) { - if(ar->swinid) { + for (ar=sa->regionbase.first; ar; ar= ar->next) { + if (ar->swinid) { CTX_wm_region_set(C, ar); ED_region_do_draw(C, ar); wm_paintcursor_draw(C, ar); @@ -167,15 +167,15 @@ static void wm_method_draw_full(bContext *C, wmWindow *win) ED_area_overdraw(C); /* draw overlapping regions */ - for(ar=screen->regionbase.first; ar; ar= ar->next) { - if(ar->swinid) { + for (ar=screen->regionbase.first; ar; ar= ar->next) { + if (ar->swinid) { CTX_wm_menu_set(C, ar); ED_region_do_draw(C, ar); CTX_wm_menu_set(C, NULL); } } - if(screen->do_draw_gesture) + if (screen->do_draw_gesture) wm_gesture_draw(win); } @@ -191,9 +191,9 @@ static void wm_flush_regions_down(bScreen *screen, rcti *dirty) ScrArea *sa; ARegion *ar; - for(sa= screen->areabase.first; sa; sa= sa->next) { - for(ar= sa->regionbase.first; ar; ar= ar->next) { - if(BLI_isect_rcti(dirty, &ar->winrct, NULL)) { + for (sa= screen->areabase.first; sa; sa= sa->next) { + for (ar= sa->regionbase.first; ar; ar= ar->next) { + if (BLI_isect_rcti(dirty, &ar->winrct, NULL)) { ar->do_draw= RGN_DRAW; memset(&ar->drawrct, 0, sizeof(ar->drawrct)); ar->swap= WIN_NONE_OK; @@ -207,8 +207,8 @@ static void wm_flush_regions_up(bScreen *screen, rcti *dirty) { ARegion *ar; - for(ar= screen->regionbase.first; ar; ar= ar->next) { - if(BLI_isect_rcti(dirty, &ar->winrct, NULL)) { + for (ar= screen->regionbase.first; ar; ar= ar->next) { + if (BLI_isect_rcti(dirty, &ar->winrct, NULL)) { ar->do_draw= RGN_DRAW; memset(&ar->drawrct, 0, sizeof(ar->drawrct)); ar->swap= WIN_NONE_OK; @@ -225,58 +225,58 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) static rcti rect= {0, 0, 0, 0}; /* after backbuffer selection draw, we need to redraw */ - for(sa= screen->areabase.first; sa; sa= sa->next) - for(ar= sa->regionbase.first; ar; ar= ar->next) - if(ar->swinid && !wm_area_test_invalid_backbuf(sa)) + for (sa= screen->areabase.first; sa; sa= sa->next) + for (ar= sa->regionbase.first; ar; ar= ar->next) + if (ar->swinid && !wm_area_test_invalid_backbuf(sa)) ED_region_tag_redraw(ar); /* flush overlapping regions */ - if(screen->regionbase.first) { + if (screen->regionbase.first) { /* flush redraws of area regions up to overlapping regions */ - for(sa= screen->areabase.first; sa; sa= sa->next) - for(ar= sa->regionbase.first; ar; ar= ar->next) - if(ar->swinid && ar->do_draw) + for (sa= screen->areabase.first; sa; sa= sa->next) + for (ar= sa->regionbase.first; ar; ar= ar->next) + if (ar->swinid && ar->do_draw) wm_flush_regions_up(screen, &ar->winrct); /* flush between overlapping regions */ - for(ar= screen->regionbase.last; ar; ar= ar->prev) - if(ar->swinid && ar->do_draw) + for (ar= screen->regionbase.last; ar; ar= ar->prev) + if (ar->swinid && ar->do_draw) wm_flush_regions_up(screen, &ar->winrct); /* flush redraws of overlapping regions down to area regions */ - for(ar= screen->regionbase.last; ar; ar= ar->prev) - if(ar->swinid && ar->do_draw) + for (ar= screen->regionbase.last; ar; ar= ar->prev) + if (ar->swinid && ar->do_draw) wm_flush_regions_down(screen, &ar->winrct); } /* flush drag item */ - if(rect.xmin!=rect.xmax) { + if (rect.xmin!=rect.xmax) { wm_flush_regions_down(screen, &rect); rect.xmin = rect.xmax = 0; } - if(wm->drags.first) { + if (wm->drags.first) { /* doesnt draw, fills rect with boundbox */ wm_drags_draw(C, win, &rect); } /* draw marked area regions */ - for(sa= screen->areabase.first; sa; sa= sa->next) { + for (sa= screen->areabase.first; sa; sa= sa->next) { CTX_wm_area_set(C, sa); - for(ar=sa->regionbase.first; ar; ar= ar->next) { - if(ar->swinid) { - if(ar->do_draw) { + for (ar=sa->regionbase.first; ar; ar= ar->next) { + if (ar->swinid) { + if (ar->do_draw) { CTX_wm_region_set(C, ar); ED_region_do_draw(C, ar); wm_paintcursor_draw(C, ar); ED_area_overdraw_flush(sa, ar); CTX_wm_region_set(C, NULL); - if(exchange) + if (exchange) ar->swap= WIN_FRONT_OK; } - else if(exchange) { - if(ar->swap == WIN_FRONT_OK) { + else if (exchange) { + if (ar->swap == WIN_FRONT_OK) { CTX_wm_region_set(C, ar); ED_region_do_draw(C, ar); wm_paintcursor_draw(C, ar); @@ -285,9 +285,9 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) ar->swap= WIN_BOTH_OK; } - else if(ar->swap == WIN_BACK_OK) + else if (ar->swap == WIN_BACK_OK) ar->swap= WIN_FRONT_OK; - else if(ar->swap == WIN_BOTH_OK) + else if (ar->swap == WIN_BOTH_OK) ar->swap= WIN_BOTH_OK; } } @@ -298,39 +298,39 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) } /* after area regions so we can do area 'overlay' drawing */ - if(screen->do_draw) { + if (screen->do_draw) { ED_screen_draw(win); - if(exchange) + if (exchange) screen->swap= WIN_FRONT_OK; } - else if(exchange) { - if(screen->swap==WIN_FRONT_OK) { + else if (exchange) { + if (screen->swap==WIN_FRONT_OK) { ED_screen_draw(win); screen->swap= WIN_BOTH_OK; } - else if(screen->swap==WIN_BACK_OK) + else if (screen->swap==WIN_BACK_OK) screen->swap= WIN_FRONT_OK; - else if(screen->swap==WIN_BOTH_OK) + else if (screen->swap==WIN_BOTH_OK) screen->swap= WIN_BOTH_OK; } ED_area_overdraw(C); /* draw marked overlapping regions */ - for(ar=screen->regionbase.first; ar; ar= ar->next) { - if(ar->swinid && ar->do_draw) { + for (ar=screen->regionbase.first; ar; ar= ar->next) { + if (ar->swinid && ar->do_draw) { CTX_wm_menu_set(C, ar); ED_region_do_draw(C, ar); CTX_wm_menu_set(C, NULL); } } - if(screen->do_draw_gesture) + if (screen->do_draw_gesture) wm_gesture_draw(win); /* needs pixel coords in screen */ - if(wm->drags.first) { + if (wm->drags.first) { wm_drags_draw(C, win, NULL); } } @@ -368,13 +368,13 @@ static void split_width(int x, int n, int *splitx, int *nx) int a, newnx, waste; /* if already power of two just use it */ - if(is_power_of_2_i(x)) { + if (is_power_of_2_i(x)) { splitx[0]= x; (*nx)++; return; } - if(n == 1) { + if (n == 1) { /* last part, we have to go larger */ splitx[0]= power_of_2_max_i(x); (*nx)++; @@ -385,12 +385,12 @@ static void split_width(int x, int n, int *splitx, int *nx) newnx= ++(*nx); split_width(x-splitx[0], n-1, splitx+1, &newnx); - for(waste=0, a=0; a<n; a++) + for (waste=0, a=0; a<n; a++) waste += splitx[a]; /* if we waste more space or use the same amount, * revert deeper splits and just use larger */ - if(waste >= power_of_2_max_i(x)) { + if (waste >= power_of_2_max_i(x)) { splitx[0]= power_of_2_max_i(x); memset(splitx+1, 0, sizeof(int)*(n-1)); } @@ -401,7 +401,7 @@ static void split_width(int x, int n, int *splitx, int *nx) static void wm_draw_triple_free(wmWindow *win) { - if(win->drawdata) { + if (win->drawdata) { wmDrawTriple *triple= win->drawdata; glDeleteTextures(triple->nx*triple->ny, triple->bind); @@ -426,14 +426,14 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) int x, y; /* compute texture sizes */ - if(GLEW_ARB_texture_rectangle || GLEW_NV_texture_rectangle || GLEW_EXT_texture_rectangle) { + if (GLEW_ARB_texture_rectangle || GLEW_NV_texture_rectangle || GLEW_EXT_texture_rectangle) { triple->target= GL_TEXTURE_RECTANGLE_ARB; triple->nx= 1; triple->ny= 1; triple->x[0]= win->sizex; triple->y[0]= win->sizey; } - else if(GPU_non_power_of_two_support()) { + else if (GPU_non_power_of_two_support()) { triple->target= GL_TEXTURE_2D; triple->nx= 1; triple->ny= 1; @@ -451,19 +451,19 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) /* generate texture names */ glGenTextures(triple->nx*triple->ny, triple->bind); - if(!triple->bind[0]) { + if (!triple->bind[0]) { /* not the typical failure case but we handle it anyway */ printf("WM: failed to allocate texture for triple buffer drawing (glGenTextures).\n"); return 0; } - for(y=0; y<triple->ny; y++) { - for(x=0; x<triple->nx; x++) { + for (y=0; y<triple->ny; y++) { + for (x=0; x<triple->nx; x++) { /* proxy texture is only guaranteed to test for the cases that * there is only one texture in use, which may not be the case */ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); - if(triple->x[x] > maxsize || triple->y[y] > maxsize) { + if (triple->x[x] > maxsize || triple->y[y] > maxsize) { glBindTexture(triple->target, 0); printf("WM: failed to allocate texture for triple buffer drawing " "(texture too large for graphics card).\n"); @@ -480,7 +480,7 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) glBindTexture(triple->target, 0); /* not sure if this works everywhere .. */ - if(glGetError() == GL_OUT_OF_MEMORY) { + if (glGetError() == GL_OUT_OF_MEMORY) { printf("WM: failed to allocate texture for triple buffer drawing (out of memory).\n"); return 0; } @@ -497,8 +497,8 @@ static void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple) glEnable(triple->target); - for(y=0, offy=0; y<triple->ny; offy+=triple->y[y], y++) { - for(x=0, offx=0; x<triple->nx; offx+=triple->x[x], x++) { + for (y=0, offy=0; y<triple->ny; offy+=triple->y[y], y++) { + for (x=0, offx=0; x<triple->nx; offx+=triple->x[x], x++) { sizex= (x == triple->nx-1)? win->sizex-offx: triple->x[x]; sizey= (y == triple->ny-1)? win->sizey-offy: triple->y[y]; @@ -509,7 +509,7 @@ static void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple) halfy= 0.375f; /* texture rectangle has unnormalized coordinates */ - if(triple->target == GL_TEXTURE_2D) { + if (triple->target == GL_TEXTURE_2D) { ratiox /= triple->x[x]; ratioy /= triple->y[y]; halfx /= triple->x[x]; @@ -543,8 +543,8 @@ static void wm_triple_copy_textures(wmWindow *win, wmDrawTriple *triple) { int x, y, sizex, sizey, offx, offy; - for(y=0, offy=0; y<triple->ny; offy+=triple->y[y], y++) { - for(x=0, offx=0; x<triple->nx; offx+=triple->x[x], x++) { + for (y=0, offy=0; y<triple->ny; offy+=triple->y[y], y++) { + for (x=0, offx=0; x<triple->nx; offx+=triple->x[x], x++) { sizex= (x == triple->nx-1)? win->sizex-offx: triple->x[x]; sizey= (y == triple->ny-1)? win->sizey-offy: triple->y[y]; @@ -565,7 +565,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) ARegion *ar; int copytex= 0, paintcursor= 1; - if(win->drawdata) { + if (win->drawdata) { glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); @@ -576,7 +576,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) else { win->drawdata= MEM_callocN(sizeof(wmDrawTriple), "wmDrawTriple"); - if(!wm_triple_gen_textures(win, win->drawdata)) { + if (!wm_triple_gen_textures(win, win->drawdata)) { wm_draw_triple_fail(C, win); return; } @@ -585,11 +585,11 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) triple= win->drawdata; /* draw marked area regions */ - for(sa= screen->areabase.first; sa; sa= sa->next) { + for (sa= screen->areabase.first; sa; sa= sa->next) { CTX_wm_area_set(C, sa); - for(ar=sa->regionbase.first; ar; ar= ar->next) { - if(ar->swinid && ar->do_draw) { + for (ar=sa->regionbase.first; ar; ar= ar->next) { + if (ar->swinid && ar->do_draw) { CTX_wm_region_set(C, ar); ED_region_do_draw(C, ar); ED_area_overdraw_flush(sa, ar); @@ -602,7 +602,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) CTX_wm_area_set(C, NULL); } - if(copytex) { + if (copytex) { wmSubWindowSet(win, screen->mainwin); ED_area_overdraw(C); @@ -613,8 +613,8 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) ED_screen_draw(win); /* draw overlapping regions */ - for(ar=screen->regionbase.first; ar; ar= ar->next) { - if(ar->swinid) { + for (ar=screen->regionbase.first; ar; ar= ar->next) { + if (ar->swinid) { CTX_wm_menu_set(C, ar); ED_region_do_draw(C, ar); CTX_wm_menu_set(C, NULL); @@ -624,13 +624,13 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) } /* always draw, not only when screen tagged */ - if(win->gesture.first) + if (win->gesture.first) wm_gesture_draw(win); - if(paintcursor && wm->paintcursors.first) { - for(sa= screen->areabase.first; sa; sa= sa->next) { - for(ar=sa->regionbase.first; ar; ar= ar->next) { - if(ar->swinid == screen->subwinactive) { + if (paintcursor && wm->paintcursors.first) { + for (sa= screen->areabase.first; sa; sa= sa->next) { + for (ar=sa->regionbase.first; ar; ar= ar->next) { + if (ar->swinid == screen->subwinactive) { CTX_wm_area_set(C, sa); CTX_wm_region_set(C, ar); @@ -648,7 +648,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) } /* needs pixel coords in screen */ - if(wm->drags.first) { + if (wm->drags.first) { wm_drags_draw(C, win, NULL); } @@ -663,36 +663,36 @@ static int wm_draw_update_test_window(wmWindow *win) ARegion *ar; int do_draw= 0; - for(ar= win->screen->regionbase.first; ar; ar= ar->next) { - if(ar->do_draw_overlay) { + for (ar= win->screen->regionbase.first; ar; ar= ar->next) { + if (ar->do_draw_overlay) { wm_tag_redraw_overlay(win, ar); ar->do_draw_overlay= 0; } - if(ar->swinid && ar->do_draw) + if (ar->swinid && ar->do_draw) do_draw= 1; } - for(sa= win->screen->areabase.first; sa; sa= sa->next) { - for(ar=sa->regionbase.first; ar; ar= ar->next) { + for (sa= win->screen->areabase.first; sa; sa= sa->next) { + for (ar=sa->regionbase.first; ar; ar= ar->next) { wm_region_test_render_do_draw(sa, ar); - if(ar->swinid && ar->do_draw) + if (ar->swinid && ar->do_draw) do_draw = 1; } } - if(do_draw) + if (do_draw) return 1; - if(win->screen->do_refresh) + if (win->screen->do_refresh) return 1; - if(win->screen->do_draw) + if (win->screen->do_draw) return 1; - if(win->screen->do_draw_gesture) + if (win->screen->do_draw_gesture) return 1; - if(win->screen->do_draw_paintcursor) + if (win->screen->do_draw_paintcursor) return 1; - if(win->screen->do_draw_drag) + if (win->screen->do_draw_drag) return 1; return 0; @@ -705,24 +705,24 @@ static int wm_automatic_draw_method(wmWindow *win) * for sculpting or drawing overlapping menus. For typically lower end cards * copy to texture is slow though and so we use overlap instead there. */ - if(win->drawmethod == USER_DRAW_AUTOMATIC) { + if (win->drawmethod == USER_DRAW_AUTOMATIC) { /* ATI opensource driver is known to be very slow at this */ - if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) + if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) return USER_DRAW_OVERLAP; /* also Intel drivers are slow */ - else if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_UNIX, GPU_DRIVER_ANY)) + else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_UNIX, GPU_DRIVER_ANY)) return USER_DRAW_OVERLAP; - else if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_ANY)) + else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_ANY)) return USER_DRAW_OVERLAP_FLIP; - else if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_ANY)) + else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_ANY)) return USER_DRAW_OVERLAP_FLIP; /* Windows software driver darkens color on each redraw */ - else if(GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE)) + else 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)) + 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) + else if (GPU_color_depth() < 24) return USER_DRAW_OVERLAP; else return USER_DRAW_TRIPLE; @@ -734,8 +734,8 @@ static int wm_automatic_draw_method(wmWindow *win) void wm_tag_redraw_overlay(wmWindow *win, ARegion *ar) { /* for draw triple gestures, paint cursors don't need region redraw */ - if(ar && win) { - if(wm_automatic_draw_method(win) != USER_DRAW_TRIPLE) + if (ar && win) { + if (wm_automatic_draw_method(win) != USER_DRAW_TRIPLE) ED_region_tag_redraw(ar); win->screen->do_draw_paintcursor= 1; } @@ -749,31 +749,31 @@ void wm_draw_update(bContext *C) GPU_free_unused_buffers(); - for(win= wm->windows.first; win; win= win->next) { - if(win->drawmethod != U.wmdrawmethod) { + for (win= wm->windows.first; win; win= win->next) { + if (win->drawmethod != U.wmdrawmethod) { wm_draw_window_clear(win); win->drawmethod= U.wmdrawmethod; } - if(wm_draw_update_test_window(win)) { + if (wm_draw_update_test_window(win)) { CTX_wm_window_set(C, win); /* sets context window+screen */ wm_window_make_drawable(C, win); /* notifiers for screen redraw */ - if(win->screen->do_refresh) + if (win->screen->do_refresh) ED_screen_refresh(wm, win); drawmethod= wm_automatic_draw_method(win); - if(win->drawfail) + if (win->drawfail) wm_method_draw_overlap_all(C, win, 0); - else if(drawmethod == USER_DRAW_FULL) + else if (drawmethod == USER_DRAW_FULL) wm_method_draw_full(C, win); - else if(drawmethod == USER_DRAW_OVERLAP) + else if (drawmethod == USER_DRAW_OVERLAP) wm_method_draw_overlap_all(C, win, 0); - else if(drawmethod == USER_DRAW_OVERLAP_FLIP) + else if (drawmethod == USER_DRAW_OVERLAP_FLIP) wm_method_draw_overlap_all(C, win, 1); else // if(drawmethod == USER_DRAW_TRIPLE) wm_method_draw_triple(C, win); @@ -796,13 +796,13 @@ void wm_draw_window_clear(wmWindow *win) ARegion *ar; int drawmethod= wm_automatic_draw_method(win); - if(drawmethod == USER_DRAW_TRIPLE) + if (drawmethod == USER_DRAW_TRIPLE) wm_draw_triple_free(win); /* clear screen swap flags */ - if(screen) { - for(sa= screen->areabase.first; sa; sa= sa->next) - for(ar=sa->regionbase.first; ar; ar= ar->next) + if (screen) { + for (sa= screen->areabase.first; sa; sa= sa->next) + for (ar=sa->regionbase.first; ar; ar= ar->next) ar->swap= WIN_NONE_OK; screen->swap= WIN_NONE_OK; @@ -813,7 +813,7 @@ void wm_draw_region_clear(wmWindow *win, ARegion *ar) { int drawmethod= wm_automatic_draw_method(win); - if(ELEM(drawmethod, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP)) + if (ELEM(drawmethod, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP)) wm_flush_regions_down(win->screen, &ar->winrct); win->screen->do_draw= 1; |