diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-01-25 08:14:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-01-25 08:14:03 +0300 |
commit | d35be5c578313d6edb6f979d3937a6b606207b4b (patch) | |
tree | 367eb5f53be31311d2c049179b7ca43ad47f9f93 /source | |
parent | dc103bceabb770f440f5ef618d12bdf4fe436058 (diff) |
Dont draw blocks what are outside the the view. - massive speedup with complex sequence's
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawseq.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index c215a256b4e..8a6e80d5f01 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -823,7 +823,15 @@ void drawseqspace(ScrArea *sa, void *spacedata) if(ed) { seq= ed->seqbasep->first; while(seq) { - if(seq->flag & SELECT); else drawseq(seq); + if (seq->flag & SELECT || + seq->start > G.v2d->cur.xmax || + seq->start+seq->len < G.v2d->cur.xmin || + seq->machine+1.0 < G.v2d->cur.ymin || seq->machine > G.v2d->cur.ymax) + { + /* do nothing */ + } else { + drawseq(seq); + } seq= seq->next; } } @@ -831,7 +839,16 @@ void drawseqspace(ScrArea *sa, void *spacedata) if(ed) { seq= ed->seqbasep->first; while(seq) { - if(seq->flag & SELECT) drawseq(seq); + if (!(seq->flag & SELECT) || + seq->start > G.v2d->cur.xmax || + seq->start+seq->len < G.v2d->cur.xmin || + seq->machine+1.0 < G.v2d->cur.ymin || + seq->machine > G.v2d->cur.ymax) + { + /* do nothing */ + } else { + drawseq(seq); + } seq= seq->next; } } |