Bug 1842999 - Part 12: Inline ResizableTypedArray getters in CacheIR. r=jandem
[gecko.git] / gfx / cairo / 18-quartz-granular-ifdefs.patch
blob47d50762e27d0eeddf633c98a8ccc3d5f5d252b9
1 diff --git a/gfx/cairo/cairo/src/cairo-quartz-font.c b/gfx/cairo/cairo/src/cairo-quartz-font.c
2 index 48f79d1680920..740ca108e7d19 100644
3 --- a/gfx/cairo/cairo/src/cairo-quartz-font.c
4 +++ b/gfx/cairo/cairo/src/cairo-quartz-font.c
5 @@ -102,8 +102,10 @@ static int (*CGFontGetAscentPtr) (CGFontRef fontRef) = NULL;
6 static int (*CGFontGetDescentPtr) (CGFontRef fontRef) = NULL;
7 static int (*CGFontGetLeadingPtr) (CGFontRef fontRef) = NULL;
9 +#ifdef CAIRO_HAS_QUARTZ_ATSUFONTID
10 /* Not public anymore in 64-bits nor in 10.7 */
11 -static ATSFontRef (*FMGetATSFontRefFromFontPtr) (FMFont iFont) = NULL;
12 +static ATSFontRef (*FMGetATSFontRefFromFontPtr) (ATSUFontID iFont) = NULL;
13 +#endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
15 static cairo_bool_t _cairo_quartz_font_symbol_lookup_done = FALSE;
16 static cairo_bool_t _cairo_quartz_font_symbols_present = FALSE;
17 @@ -164,7 +166,9 @@ quartz_font_ensure_symbols(void)
18 CGContextGetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextGetAllowsFontSmoothing");
19 CGContextSetAllowsFontSmoothingPtr = dlsym(RTLD_DEFAULT, "CGContextSetAllowsFontSmoothing");
21 +#ifdef CAIRO_HAS_QUARTZ_ATSUFONTID
22 FMGetATSFontRefFromFontPtr = dlsym(RTLD_DEFAULT, "FMGetATSFontRefFromFont");
23 +#endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
25 if ((CGFontCreateWithFontNamePtr || CGFontCreateWithNamePtr) &&
26 CGFontGetGlyphBBoxesPtr &&
27 @@ -870,6 +874,7 @@ _cairo_quartz_scaled_font_get_ct_font_ref (cairo_scaled_font_t *abstract_font)
29 * compat with old ATSUI backend
31 +#ifdef CAIRO_HAS_QUARTZ_ATSUFONTID
33 /**
34 * cairo_quartz_font_face_create_for_atsu_font_id:
35 @@ -913,3 +918,5 @@ cairo_atsui_font_face_create_for_atsu_font_id (ATSUFontID font_id)
37 return cairo_quartz_font_face_create_for_atsu_font_id (font_id);
40 +#endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
41 diff --git a/gfx/cairo/cairo/src/cairo-quartz-image.h b/gfx/cairo/cairo/src/cairo-quartz-image.h
42 index 0dd5abb4fd2d2..9e8409c1169b3 100644
43 --- a/gfx/cairo/cairo/src/cairo-quartz-image.h
44 +++ b/gfx/cairo/cairo/src/cairo-quartz-image.h
45 @@ -40,8 +40,6 @@
47 #if CAIRO_HAS_QUARTZ_IMAGE_SURFACE
49 -#include <Carbon/Carbon.h>
51 CAIRO_BEGIN_DECLS
53 cairo_public cairo_surface_t *
54 diff --git a/gfx/cairo/cairo/src/cairo-quartz.h b/gfx/cairo/cairo/src/cairo-quartz.h
55 index 20c86423b25de..2118d8ff9c842 100644
56 --- a/gfx/cairo/cairo/src/cairo-quartz.h
57 +++ b/gfx/cairo/cairo/src/cairo-quartz.h
58 @@ -40,7 +40,14 @@
60 #if CAIRO_HAS_QUARTZ_SURFACE
62 +#if CAIRO_HAS_QUARTZ_CORE_GRAPHICS
63 +#include <CoreGraphics/CoreGraphics.h>
64 +#include <CoreText/CoreText.h>
65 +#endif
67 +#if CAIRO_HAS_QUARTZ_APPLICATION_SERVICES
68 #include <ApplicationServices/ApplicationServices.h>
69 +#endif
71 CAIRO_BEGIN_DECLS
73 @@ -75,8 +82,10 @@ cairo_quartz_surface_get_image (cairo_surface_t *surface);
74 cairo_public cairo_font_face_t *
75 cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
77 +#if CAIRO_HAS_QUARTZ_ATSUFONTID
78 cairo_public cairo_font_face_t *
79 cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id);
80 +#endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
82 #endif /* CAIRO_HAS_QUARTZ_FONT */