aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-08-10 23:56:59 +1000
committernyamatongwe <unknown>2011-08-10 23:56:59 +1000
commit8bf7c53bd47fa32dd162d9db1063545537b1bb5f (patch)
treec401b75620e16fa591de3aca73465f7c5d471653 /win32/ScintillaWin.cxx
parent305b3107ba2abd43e3ed635916c3cad52dc605fe (diff)
downloadscintilla-mirror-8bf7c53bd47fa32dd162d9db1063545537b1bb5f.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;