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:
authorCampbell Barton <ideasman42@gmail.com>2013-08-05 08:52:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-05 08:52:27 +0400
commit0395b8eee8aeaac33d42e0e560412baebacc6248 (patch)
treec464ec302888052611568d4a065ea49e55c9cd5f /source/blender/editors/screen/area.c
parent37ff3a0e8a3d47943d8f73a21f0551dfc5587009 (diff)
border render with cycles had 1 pixel offset on the top-right edge of the image, issue was caused by wmSubWindowScissorSet adding 1 to the ar->drawrct, now only add the padding when drawing the entire area
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 27b519c4355..e805b3f30fc 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -387,7 +387,7 @@ void ED_region_set(const bContext *C, ARegion *ar)
ar->drawrct = ar->winrct;
/* note; this sets state, so we can use wmOrtho and friends */
- wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct);
+ wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, true);
UI_SetTheme(sa ? sa->spacetype : 0, ar->type ? ar->type->regionid : 0);
@@ -401,21 +401,25 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
wmWindow *win = CTX_wm_window(C);
ScrArea *sa = CTX_wm_area(C);
ARegionType *at = ar->type;
-
+ bool scissor_pad;
+
/* see BKE_spacedata_draw_locks() */
if (at->do_lock)
return;
/* if no partial draw rect set, full rect */
- if (ar->drawrct.xmin == ar->drawrct.xmax)
+ if (ar->drawrct.xmin == ar->drawrct.xmax) {
ar->drawrct = ar->winrct;
+ scissor_pad = true;
+ }
else {
/* extra clip for safety */
BLI_rcti_isect(&ar->winrct, &ar->drawrct, &ar->drawrct);
+ scissor_pad = false;
}
/* note; this sets state, so we can use wmOrtho and friends */
- wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct);
+ wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad);
UI_SetTheme(sa ? sa->spacetype : 0, at->regionid);