diff options
author | nyamatongwe <devnull@localhost> | 2010-09-25 18:02:59 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-09-25 18:02:59 +1000 |
commit | 37d3d30561e4bb5740aac4977a8191a7bb29959a (patch) | |
tree | a2bfaf25a52ce4c3061f4eb1c409ef8cb57df6ef /src/ViewStyle.cxx | |
parent | 18dd7b2eaa6d7228328a6a5dbac3306305841ad6 (diff) | |
download | scintilla-mirror-37d3d30561e4bb5740aac4977a8191a7bb29959a.tar.gz |
Optimization of line layout by minimizing calls in Editor::LayoutLine and avoiding
case force processing unless at least one style uses a case force option.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index d29ee8612..1b315d17e 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -129,6 +129,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) { caretStyle = source.caretStyle; caretWidth = source.caretWidth; someStylesProtected = false; + someStylesForceCase = false; leftMarginWidth = source.leftMarginWidth; rightMarginWidth = source.rightMarginWidth; for (int i=0; i < margins; i++) { @@ -213,6 +214,7 @@ void ViewStyle::Init(size_t stylesSize_) { caretStyle = CARETSTYLE_LINE; caretWidth = 1; someStylesProtected = false; + someStylesForceCase = false; hotspotForegroundSet = false; hotspotForeground.desired = ColourDesired(0, 0, 0xff); @@ -295,6 +297,7 @@ void ViewStyle::Refresh(Surface &surface) { maxAscent = styles[STYLE_DEFAULT].ascent; maxDescent = styles[STYLE_DEFAULT].descent; someStylesProtected = false; + someStylesForceCase = false; for (unsigned int i=0; i<stylesSize; i++) { if (i != STYLE_DEFAULT) { styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT], extraFontFlag); @@ -306,6 +309,9 @@ void ViewStyle::Refresh(Surface &surface) { if (styles[i].IsProtected()) { someStylesProtected = true; } + if (styles[i].caseForce != Style::caseMixed) { + someStylesForceCase = true; + } } maxAscent += extraAscent; maxDescent += extraDescent; |