From 10cf4beef4d7293d6d382fe4b3216da48fa87fa1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 25 Sep 2010 18:02:59 +1000 Subject: 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. --- src/ViewStyle.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ViewStyle.cxx') 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