summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-07 11:06:23 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-07 14:53:12 +0100
commit7b8a065ea3a3427bf7257721d8e6d73c401a53ec (patch)
tree384adbb575de212ac5942c9abee5da924f45834e /gfx
parent620fdbdf43c28a32cb18f880137c88d46759c387 (diff)
downloadUXP-7b8a065ea3a3427bf7257721d8e6d73c401a53ec.tar
UXP-7b8a065ea3a3427bf7257721d8e6d73c401a53ec.tar.gz
UXP-7b8a065ea3a3427bf7257721d8e6d73c401a53ec.tar.lz
UXP-7b8a065ea3a3427bf7257721d8e6d73c401a53ec.tar.xz
UXP-7b8a065ea3a3427bf7257721d8e6d73c401a53ec.zip
Issue #1274 - Part 4: Remove some unnecessary checks for old Windows versions.
This gets rid of deprecated GetVersionEx() calls as a bonus.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-font.c14
-rw-r--r--gfx/cairo/cairo/src/cairo-win32-surface.c18
2 files changed, 4 insertions, 28 deletions
diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
index 5891799c9..ccdd16187 100644
--- a/gfx/cairo/cairo/src/cairo-win32-font.c
+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
@@ -216,18 +216,8 @@ _compute_transform (cairo_win32_scaled_font_t *scaled_font,
static cairo_bool_t
_have_cleartype_quality (void)
{
- OSVERSIONINFO version_info;
-
- version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
-
- if (!GetVersionEx (&version_info)) {
- _cairo_win32_print_gdi_error ("_have_cleartype_quality");
- return FALSE;
- }
-
- return (version_info.dwMajorVersion > 5 ||
- (version_info.dwMajorVersion == 5 &&
- version_info.dwMinorVersion >= 1)); /* XP or newer */
+ // All supported versions have cleartype
+ return TRUE;
}
BYTE
diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
index 989e411cc..2d7395590 100644
--- a/gfx/cairo/cairo/src/cairo-win32-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
@@ -915,28 +915,14 @@ _composite_alpha_blend (cairo_win32_surface_t *dst,
BLENDFUNCTION blend_function;
- /* Check for AlphaBlend dynamically to allow compiling on
- * MSVC 6 and use on older windows versions
- */
+ /* Check for AlphaBlend dynamically */
if (!alpha_blend_checked) {
- OSVERSIONINFO os;
-
- os.dwOSVersionInfoSize = sizeof (os);
- GetVersionEx (&os);
-
- /* If running on Win98, disable using AlphaBlend()
- * to avoid Win98 AlphaBlend() bug */
- if (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId ||
- os.dwMajorVersion != 4 || os.dwMinorVersion != 10)
- {
HMODULE msimg32_dll = LoadLibraryW (L"msimg32");
if (msimg32_dll != NULL)
alpha_blend = (cairo_alpha_blend_func_t)GetProcAddress (msimg32_dll,
"AlphaBlend");
- }
-
- alpha_blend_checked = TRUE;
+ alpha_blend_checked = TRUE;
}
if (alpha_blend == NULL)