In order to remove the secondary causes of 2313 (unnecessary split of text into multiple runs), I have moved into the non-bidi build some code used previously only in the bidi build, namely:
* added call to coalesceRuns() into fl_BlockLayout::format(). The result of this is that at any given time our document is represented by the smallest number of runs required. This not only saves memory usage (previously if you started a new paragraph every single character lived in a run of its own until you hit enter), but also, and more importantly, speeds up drawing since any uniformly formatted line gets drawn by a single call to the OS text drawing routine. The down side is that we do extra run spliting/merging if you edit in a middle of a pragraph, but that is negligeable in terms of performance since at worst it impacts only a single line (the one being edited) and because that line is in the end drawn by a smaller number of calls to the OS, at the end of the day we should still be better off than we were before. * removed some unecessary and time consuming width calculation code from fp_TextRun::mergeWithNext(). * moved the fp_TextRun::_addupCharWidths() function out of the bidi-only section * replaced the simpleRecalcWidth() calls in fp_TextRun::split() with calls to _addupCharWidths(), saving a multitude of unnecessary calls to the OS character measuring routine. * removed a clearScreen() call from fp_TextRun::recalcWidth() which was the source of bad, non-bidi-specific flicker when editing a justified paragraph. Tomas
