Bug 1845174 - Don't use variation fonts on Android API versions <= 23. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D186242
This commit is contained in:
Jonathan Kew 2023-08-16 12:23:43 +00:00
Родитель 518cc7ad58
Коммит 03f8c04eca
2 изменённых файлов: 8 добавлений и 5 удалений

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

@ -287,6 +287,13 @@ bool gfxAndroidPlatform::RequiresLinearZoom() {
return gfxPlatform::RequiresLinearZoom();
}
bool gfxAndroidPlatform::CheckVariationFontSupport() {
// Don't attempt to use variations on Android API versions up to Marshmallow,
// because the system freetype version is too old and the parent process may
// access it during printing (bug 1845174).
return jni::GetAPIVersion() > 23;
}
class AndroidVsyncSource final : public VsyncSource,
public widget::AndroidVsync::Observer {
public:

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

@ -40,11 +40,7 @@ class gfxAndroidPlatform final : public gfxPlatform {
already_AddRefed<mozilla::gfx::VsyncSource> CreateGlobalHardwareVsyncSource()
override;
static bool CheckVariationFontSupport() {
// We build with in-tree FreeType, so we know it is a new enough
// version to support variations.
return true;
}
static bool CheckVariationFontSupport();
protected:
void InitAcceleration() override;