diff options
author | 2014-06-14 19:16:13 -0400 | |
---|---|---|
committer | 2015-12-06 17:42:34 -0500 | |
commit | 32afa961116b5a0a22e6558a39016f17f76452c6 (patch) | |
tree | 3cb427fd3db5911b8ea9f7f2c54364114f35070b /src/terminal/terminal.cc | |
parent | 8fdcdc88cd002ac06d551714db35a2519cb9d205 (diff) |
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.
Diffstat (limited to 'src/terminal/terminal.cc')
-rw-r--r-- | src/terminal/terminal.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/terminal/terminal.cc b/src/terminal/terminal.cc index 3876547..6d6fee0 100644 --- a/src/terminal/terminal.cc +++ b/src/terminal/terminal.cc @@ -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 ); } |