Bug 1562555 Don't scale widget pixmaps on older than GTK 3.22, r=stransky

Pre GTK 3.22 releases does not show hidpi widget pixmaps correctly.

Differential Revision: https://phabricator.services.mozilla.com/D37724

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan Horak 2019-07-17 16:00:23 +00:00
Родитель 22066b4763
Коммит 15c671a2cb
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -867,8 +867,9 @@ static void DrawThemeWithCairo(gfxContext* aContext, DrawTarget* aDrawTarget,
static auto sCairoSurfaceSetDeviceScalePtr =
(void (*)(cairo_surface_t*, double, double))dlsym(
RTLD_DEFAULT, "cairo_surface_set_device_scale");
bool useHiDPIWidgets =
(aScaleFactor != 1) && (sCairoSurfaceSetDeviceScalePtr != nullptr);
bool useHiDPIWidgets = (aScaleFactor != 1) &&
(gtk_check_version(3, 22, 0) != nullptr) &&
(sCairoSurfaceSetDeviceScalePtr != nullptr);
Point drawOffsetScaled;
Point drawOffsetOriginal;