diff options
author | nyamatongwe <unknown> | 2010-09-25 18:02:59 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-09-25 18:02:59 +1000 |
commit | 10cf4beef4d7293d6d382fe4b3216da48fa87fa1 (patch) | |
tree | 07d01bea7f3d55860a7b45d500a5901f4d5b63d4 /src/ViewStyle.cxx | |
parent | 16b604e76efd53716623978c94069fd6194c7005 (diff) | |
download | scintilla-mirror-10cf4beef4d7293d6d382fe4b3216da48fa87fa1.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; |