Change Framebuffer's containers/methods to improve performance.

* Reduce the size of Terminal::Cell.
* Change colors and attributes in Terminal::Rendition to bitfields/bitmask.
* Change Cells to use UTF-8 strings instead of vector<wchar_t>.  Store Rows in a vector instead of a deque.
* Add various Framebuffer::append() methods for more efficient passing of single and repeated characters.
* Change title/icon strings from deques to a vector typedef-- this is more for tidiness than any real performance.
This commit is contained in:
John Hood
2014-06-14 19:16:13 -04:00
parent 8fdcdc88cd
commit 32afa96111
10 changed files with 195 additions and 164 deletions
+2 -3
View File
@@ -97,7 +97,7 @@ void Emulator::print( const Parser::Print *act )
this_cell = fb.get_mutable_cell();
fb.reset_cell( this_cell );
this_cell->contents.push_back( act->ch );
this_cell->append( act->ch );
this_cell->width = chwidth;
fb.apply_renditions_to_current_cell();
@@ -127,8 +127,7 @@ void Emulator::print( const Parser::Print *act )
combining_cell->fallback = true;
fb.ds.move_col( 1, true, true );
}
if ( combining_cell->contents.size() < 16 ) {
if ( combining_cell->contents.size() < 32 ) {
/* seems like a reasonable limit on combining characters */
combining_cell->contents.push_back( act->ch );
}