diff options
author | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2011-10-12 13:11:55 -0400 |
---|---|---|
committer | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2011-10-12 13:11:55 -0400 |
commit | 82a54cc43807fc82d1a81b73000c952bbf4bb0b8 (patch) | |
tree | 664c70a231a449f1a24e990417e499514bea7935 | |
parent | 27219c5372566c00903c3951976f681a409f9fcc (diff) | |
download | eclipse.platform.swt-82a54cc43807fc82d1a81b73000c952bbf4bb0b8.tar.gz eclipse.platform.swt-82a54cc43807fc82d1a81b73000c952bbf4bb0b8.tar.xz eclipse.platform.swt-82a54cc43807fc82d1a81b73000c952bbf4bb0b8.zip |
Bug 352927 - SWT StyledText scrolling is very slow for text with lots of commas
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java index 3688135061..dbd91a4403 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java @@ -2604,6 +2604,18 @@ StyleItem[] itemize () { scriptState.uBidiLevel = 1; scriptState.fArabicNumContext = true; } + + /* + * In the version of Usp10.h that SWT is compiled the fReserved field is declared + * as a bitfield size 8. In newer versions of the Uniscribe, the first bit of fReserved + * was used to implement the fMergeNeutralItems feature which can be used to increase + * performance by reducing the number of SCRIPT_ITEM returned by ScriptItemize. + * + * Note: This code is wrong on a big endian machine. + */ + if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) { + scriptControl.fReserved = 0x1; + } OS.ScriptApplyDigitSubstitution(null, scriptControl, scriptState); int /*long*/ hHeap = OS.GetProcessHeap(); |