Sequencer: Try to avoid excessive double buffer flips when the transport is rolling.
This commit is contained in:
parent
e1495ba425
commit
c74cd04bab
|
@ -483,6 +483,13 @@ Canvas::draw_line ( int x, int flags )
|
||||||
m.current[ x ][ y ].flags |= 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 */
|
/** draw only the playhead--without reexamining the grid */
|
||||||
int
|
int
|
||||||
|
|
|
@ -157,6 +157,7 @@ public:
|
||||||
void notes ( char *s );
|
void notes ( char *s );
|
||||||
char * notes ( void );
|
char * notes ( void );
|
||||||
void randomize_row ( int y );
|
void randomize_row ( int y );
|
||||||
|
int playhead_moved ( void );
|
||||||
|
|
||||||
void start_cursor ( int x, int y );
|
void start_cursor ( int x, int y );
|
||||||
void end_cursor ( int x, int y );
|
void end_cursor ( int x, int y );
|
||||||
|
|
|
@ -1591,7 +1591,11 @@ _flags |= FL_DAMAGE_SCROLL;} {}
|
||||||
}
|
}
|
||||||
Function {draw_playhead( void )} {open return_type void
|
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
|
Function {draw_border()} {open return_type void
|
||||||
} {
|
} {
|
||||||
|
|
Loading…
Reference in New Issue