aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authorMarko Njezic <unknown>2012-02-29 21:22:42 +0100
committerMarko Njezic <unknown>2012-02-29 21:22:42 +0100
commit3d91a7fa83e29989ac81764e5c0793bc1960305c (patch)
tree4c7bda2f2780a94ef0b9a56bf341809fba1b2f9f /win32/PlatWin.cxx
parent397ffefa04cf7cdcbccec17512f3ac867d75707b (diff)
downloadscintilla-mirror-3d91a7fa83e29989ac81764e5c0793bc1960305c.tar.gz
Bug #3495791. Create auxiliary surfaces on Direct2D without alpha channel, as
no underlying code expects them to be transparent. This will make text drawing use the same anti-aliasing mode no matter if using buffered mode or not.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 15b3655bf..5884cd4f2 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1279,8 +1279,11 @@ void SurfaceD2D::InitPixMap(int width, int height, Surface *surface_, WindowID)
SetScale();
SurfaceD2D *psurfOther = static_cast<SurfaceD2D *>(surface_);
ID2D1BitmapRenderTarget *pCompatibleRenderTarget = NULL;
+ D2D1_SIZE_F desiredSize = D2D1::SizeF(width, height);
+ D2D1_PIXEL_FORMAT desiredFormat = psurfOther->pRenderTarget->GetPixelFormat();
+ desiredFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
HRESULT hr = psurfOther->pRenderTarget->CreateCompatibleRenderTarget(
- D2D1::SizeF(width, height), &pCompatibleRenderTarget);
+ &desiredSize, NULL, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &pCompatibleRenderTarget);
if (SUCCEEDED(hr)) {
pRenderTarget = pCompatibleRenderTarget;
pRenderTarget->BeginDraw();