- bool ok = ::MaskBlt(GetHdc(), x, y, width, height,
+ // On some systems, MaskBlt succeeds yet is much much slower
+ // than the wxWindows fall-back implementation. So we need
+ // to be able to switch this on and off at runtime.
+ bool ok = FALSE;
+ if (wxSystemSettings::GetOptionInt(wxT("no-maskblt")) == 0)
+ {
+ HDC hdcMem = ::CreateCompatibleDC(GetHdc());
+ ::SelectObject(hdcMem, GetHbitmapOf(bmp));
+
+ ok = ::MaskBlt(GetHdc(), x, y, width, height,