aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-08-10 23:56:59 +1000
committernyamatongwe <devnull@localhost>2011-08-10 23:56:59 +1000
commit6860b289d19541ccb8d5be31c81c0f1aa992e9d7 (patch)
treea956b90c8d42a4f6041dce7251007f0b7e8e12d7 /win32/ScintillaWin.cxx
parent4b3344ecf4e02df4ad1530e4b46d477457d73f95 (diff)
downloadscintilla-mirror-6860b289d19541ccb8d5be31c81c0f1aa992e9d7.tar.gz
Implement 'technology' concept which will allow GDI and Direct2D/DirectWrite
to run at the same time for different windows and operations.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 28a630246..b3b9d1bb0 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1127,6 +1127,16 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
case SCI_GETKEYSUNICODE:
return keysAlwaysUnicode;
+
+ case SCI_SETTECHNOLOGY:
+ if ((wParam == SC_TECHNOLOGY_DEFAULT) || (wParam == SC_TECHNOLOGY_DIRECTWRITE)) {
+ if (technology != static_cast<int>(wParam)) {
+ technology = wParam;
+ // Invalidate all cached information including layout.
+ InvalidateStyleRedraw();
+ }
+ }
+ break;
#ifdef SCI_LEXER
case SCI_LOADLEXERLIBRARY:
@@ -2751,7 +2761,7 @@ sptr_t PASCAL ScintillaWin::CTWndProc(
} else if (iMessage == WM_PAINT) {
PAINTSTRUCT ps;
::BeginPaint(hWnd, &ps);
- Surface *surfaceWindow = Surface::Allocate();
+ Surface *surfaceWindow = Surface::Allocate(sciThis->technology);
if (surfaceWindow) {
ID2D1HwndRenderTarget *pCTRenderTarget = 0;
RECT rc;