summaryrefslogtreecommitdiff
path: root/chromium/content/renderer/theme_helper_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/renderer/theme_helper_mac.mm')
-rw-r--r--chromium/content/renderer/theme_helper_mac.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/content/renderer/theme_helper_mac.mm b/chromium/content/renderer/theme_helper_mac.mm
index 7fbc6ba1a55..1db12974099 100644
--- a/chromium/content/renderer/theme_helper_mac.mm
+++ b/chromium/content/renderer/theme_helper_mac.mm
@@ -8,6 +8,10 @@
#include "base/strings/sys_string_conversions.h"
+extern "C" {
+bool CGFontRenderingGetFontSmoothingDisabled(void) API_AVAILABLE(macos(10.14));
+}
+
namespace content {
void SystemColorsDidChange(int aqua_color_variant,
@@ -52,4 +56,12 @@ void SystemColorsDidChange(int aqua_color_variant,
object:nil];
}
+bool IsSubpixelAntialiasingAvailable() {
+ if (__builtin_available(macOS 10.14, *)) {
+ // See https://trac.webkit.org/changeset/239306/webkit for more info.
+ return !CGFontRenderingGetFontSmoothingDisabled();
+ }
+ return true;
+}
+
} // namespace content