Browse Source

Sequencer: Try to avoid excessive double buffer flips when the transport is rolling.

tags/non-daw-v1.2.0
Jonathan Moore Liles 13 years ago
parent
commit
c74cd04bab
3 changed files with 13 additions and 1 deletions
  1. +7
    -0
      sequencer/src/canvas.C
  2. +1
    -0
      sequencer/src/canvas.H
  3. +5
    -1
      sequencer/src/gui/ui.fl

+ 7
- 0
sequencer/src/canvas.C View File

@@ -483,6 +483,13 @@ Canvas::draw_line ( int x, int flags )
m.current[ x ][ y ].flags |= flags;
}

int
Canvas::playhead_moved ( void )
{
int x = m.grid->ts_to_x( m.grid->index() );
return m.playhead != x;
}

/** draw only the playhead--without reexamining the grid */
int


+ 1
- 0
sequencer/src/canvas.H View File

@@ -157,6 +157,7 @@ public:
void notes ( char *s );
char * notes ( void );
void randomize_row ( int y );
int playhead_moved ( void );

void start_cursor ( int x, int y );
void end_cursor ( int x, int y );


+ 5
- 1
sequencer/src/gui/ui.fl View File

@@ -1591,7 +1591,11 @@ _flags |= FL_DAMAGE_SCROLL;} {}
}
Function {draw_playhead( void )} {open return_type void
} {
code {damage( FL_DAMAGE_USER1 );} {}
code {
if ( _c && _c->playhead_moved() )
{
damage( FL_DAMAGE_USER1 );
}} {}
}
Function {draw_border()} {open return_type void
} {


Loading…
Cancel
Save