diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-06-08 10:41:04 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-06-08 10:41:04 +0300 |
commit | a6fdd7d8765ca5b87db4f2a7e562e9f4525dcc5a (patch) | |
tree | 4ebcf5e4a137ccf96f227093ab52ed0c197b810a /source/blender/editors/screen | |
parent | 95a603c607b88f4527c7b8edf4eeacd1ba380867 (diff) | |
parent | fc60689a258a4a9c7c73c0a91cdfeeb57ecc3ccb (diff) |
Merge branch 'master' into object_nodes
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 6 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 5 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 16 |
3 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index cbf87062955..014268262c4 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -579,6 +579,10 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo draw_h = min_ii(img_h - off_y, ceil((scissor[3] - rast_y) / yzoom)); if (draw_w > 0 && draw_h > 0) { + + int bound_options; + GPU_BASIC_SHADER_DISABLE_AND_STORE(bound_options); + /* Don't use safe RasterPos (slower) if we can avoid it. */ if (rast_x >= 0 && rast_y >= 0) { glRasterPos2f(rast_x, rast_y); @@ -610,6 +614,8 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo } glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + + GPU_BASIC_SHADER_ENABLE_AND_RESTORE(bound_options); } } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 6413d0e86e7..a93c8c83cbb 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -2070,7 +2070,10 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync, sad->refresh = refresh; sad->flag |= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0; sad->flag |= (sync == 0) ? ANIMPLAY_FLAG_NO_SYNC : (sync == 1) ? ANIMPLAY_FLAG_SYNC : 0; - + + ScrArea *sa = CTX_wm_area(C); + sad->from_anim_edit = (ELEM(sa->spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA, SPACE_TIME)); + screen->animtimer->customdata = sad; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 4111f67553a..f340f716ccb 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3355,24 +3355,24 @@ static int match_area_with_refresh(int spacetype, int refresh) return 0; } -static int match_region_with_redraws(int spacetype, int regiontype, int redraws) +static int match_region_with_redraws(int spacetype, int regiontype, int redraws, bool from_anim_edit) { if (regiontype == RGN_TYPE_WINDOW) { switch (spacetype) { case SPACE_VIEW3D: - if (redraws & TIME_ALL_3D_WIN) + if ((redraws & TIME_ALL_3D_WIN) || from_anim_edit) return 1; break; case SPACE_IPO: case SPACE_ACTION: case SPACE_NLA: - if (redraws & TIME_ALL_ANIM_WIN) + if ((redraws & TIME_ALL_ANIM_WIN) || from_anim_edit) return 1; break; case SPACE_TIME: /* if only 1 window or 3d windows, we do timeline too */ - if (redraws & (TIME_ALL_ANIM_WIN | TIME_REGION | TIME_ALL_3D_WIN)) + if ((redraws & (TIME_ALL_ANIM_WIN | TIME_REGION | TIME_ALL_3D_WIN)) || from_anim_edit) return 1; break; case SPACE_BUTS: @@ -3380,7 +3380,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws) return 1; break; case SPACE_SEQ: - if (redraws & (TIME_SEQ | TIME_ALL_ANIM_WIN)) + if ((redraws & (TIME_SEQ | TIME_ALL_ANIM_WIN)) || from_anim_edit) return 1; break; case SPACE_NODE: @@ -3388,11 +3388,11 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws) return 1; break; case SPACE_IMAGE: - if (redraws & TIME_ALL_IMAGE_WIN) + if ((redraws & TIME_ALL_IMAGE_WIN) || from_anim_edit) return 1; break; case SPACE_CLIP: - if (redraws & TIME_CLIPS) + if ((redraws & TIME_CLIPS) || from_anim_edit) return 1; break; @@ -3572,7 +3572,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv if (ar == sad->ar) { redraw = true; } - else if (match_region_with_redraws(sa->spacetype, ar->regiontype, sad->redraws)) { + else if (match_region_with_redraws(sa->spacetype, ar->regiontype, sad->redraws, sad->from_anim_edit)) { redraw = true; } |