03-expose-lcd-filter.patch (6370B)
1 diff --git a/gfx/cairo/cairo/src/cairo-font-options.c b/gfx/cairo/cairo/src/cairo-font-options.c 2 --- a/gfx/cairo/cairo/src/cairo-font-options.c 3 +++ b/gfx/cairo/cairo/src/cairo-font-options.c 4 @@ -412,7 +412,7 @@ cairo_font_options_get_subpixel_order (c 5 } 6 7 /** 8 - * _cairo_font_options_set_lcd_filter: 9 + * cairo_font_options_set_lcd_filter: 10 * @options: a #cairo_font_options_t 11 * @lcd_filter: the new LCD filter 12 * 13 @@ -422,8 +422,8 @@ cairo_font_options_get_subpixel_order (c 14 * #cairo_lcd_filter_t for full details. 15 **/ 16 void 17 -_cairo_font_options_set_lcd_filter (cairo_font_options_t *options, 18 - cairo_lcd_filter_t lcd_filter) 19 +cairo_font_options_set_lcd_filter (cairo_font_options_t *options, 20 + cairo_lcd_filter_t lcd_filter) 21 { 22 if (cairo_font_options_status (options)) 23 return; 24 @@ -432,7 +432,7 @@ void 25 } 26 27 /** 28 - * _cairo_font_options_get_lcd_filter: 29 + * cairo_font_options_get_lcd_filter: 30 * @options: a #cairo_font_options_t 31 * 32 * Gets the LCD filter for the font options object. 33 @@ -441,7 +441,7 @@ void 34 * Return value: the LCD filter for the font options object 35 **/ 36 cairo_lcd_filter_t 37 -_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options) 38 +cairo_font_options_get_lcd_filter (const cairo_font_options_t *options) 39 { 40 if (cairo_font_options_status ((cairo_font_options_t *) options)) 41 return CAIRO_LCD_FILTER_DEFAULT; 42 diff --git a/gfx/cairo/cairo/src/cairo-types-private.h b/gfx/cairo/cairo/src/cairo-types-private.h 43 --- a/gfx/cairo/cairo/src/cairo-types-private.h 44 +++ b/gfx/cairo/cairo/src/cairo-types-private.h 45 @@ -157,30 +157,6 @@ struct _cairo_array { 46 char *elements; 47 }; 48 49 -/** 50 - * _cairo_lcd_filter: 51 - * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for 52 - * font backend and target device 53 - * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering 54 - * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter 55 - * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel 56 - * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel 57 - * 58 - * The LCD filter specifies the low-pass filter applied to LCD-optimized 59 - * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL. 60 - * 61 - * Note: This API was temporarily made available in the public 62 - * interface during the 1.7.x development series, but was made private 63 - * before 1.8. 64 - **/ 65 -typedef enum _cairo_lcd_filter { 66 - CAIRO_LCD_FILTER_DEFAULT, 67 - CAIRO_LCD_FILTER_NONE, 68 - CAIRO_LCD_FILTER_INTRA_PIXEL, 69 - CAIRO_LCD_FILTER_FIR3, 70 - CAIRO_LCD_FILTER_FIR5 71 -} cairo_lcd_filter_t; 72 - 73 typedef enum _cairo_round_glyph_positions { 74 CAIRO_ROUND_GLYPH_POS_DEFAULT, 75 CAIRO_ROUND_GLYPH_POS_ON, 76 diff --git a/gfx/cairo/cairo/src/cairo-xcb-screen.c b/gfx/cairo/cairo/src/cairo-xcb-screen.c 77 --- a/gfx/cairo/cairo/src/cairo-xcb-screen.c 78 +++ b/gfx/cairo/cairo/src/cairo-xcb-screen.c 79 @@ -121,7 +121,7 @@ static void 80 cairo_font_options_set_hint_style (&screen->font_options, hint_style); 81 cairo_font_options_set_antialias (&screen->font_options, antialias); 82 cairo_font_options_set_subpixel_order (&screen->font_options, subpixel_order); 83 - _cairo_font_options_set_lcd_filter (&screen->font_options, lcd_filter); 84 + cairo_font_options_set_lcd_filter (&screen->font_options, lcd_filter); 85 cairo_font_options_set_hint_metrics (&screen->font_options, CAIRO_HINT_METRICS_ON); 86 } 87 88 diff --git a/gfx/cairo/cairo/src/cairo-xlib-screen.c b/gfx/cairo/cairo/src/cairo-xlib-screen.c 89 --- a/gfx/cairo/cairo/src/cairo-xlib-screen.c 90 +++ b/gfx/cairo/cairo/src/cairo-xlib-screen.c 91 @@ -265,7 +265,7 @@ static void 92 cairo_font_options_set_hint_style (&info->font_options, hint_style); 93 cairo_font_options_set_antialias (&info->font_options, antialias); 94 cairo_font_options_set_subpixel_order (&info->font_options, subpixel_order); 95 - _cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter); 96 + cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter); 97 cairo_font_options_set_hint_metrics (&info->font_options, CAIRO_HINT_METRICS_ON); 98 } 99 100 diff --git a/gfx/cairo/cairo/src/cairo.h b/gfx/cairo/cairo/src/cairo.h 101 --- a/gfx/cairo/cairo/src/cairo.h 102 +++ b/gfx/cairo/cairo/src/cairo.h 103 @@ -1365,6 +1365,30 @@ typedef enum _cairo_hint_metrics { 104 } cairo_hint_metrics_t; 105 106 /** 107 + * _cairo_lcd_filter: 108 + * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for 109 + * font backend and target device 110 + * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering 111 + * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter 112 + * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel 113 + * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel 114 + * 115 + * The LCD filter specifies the low-pass filter applied to LCD-optimized 116 + * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL. 117 + * 118 + * Note: This API was temporarily made available in the public 119 + * interface during the 1.7.x development series, but was made private 120 + * before 1.8. 121 + **/ 122 +typedef enum _cairo_lcd_filter { 123 + CAIRO_LCD_FILTER_DEFAULT, 124 + CAIRO_LCD_FILTER_NONE, 125 + CAIRO_LCD_FILTER_INTRA_PIXEL, 126 + CAIRO_LCD_FILTER_FIR3, 127 + CAIRO_LCD_FILTER_FIR5 128 +} cairo_lcd_filter_t; 129 + 130 +/** 131 * cairo_font_options_t: 132 * 133 * An opaque structure holding all options that are used when 134 @@ -1470,6 +1494,13 @@ cairo_get_font_options (cairo_t 135 cairo_font_options_t *options); 136 137 cairo_public void 138 +cairo_font_options_set_lcd_filter (cairo_font_options_t *options, 139 + cairo_lcd_filter_t lcd_filter); 140 + 141 +cairo_public cairo_lcd_filter_t 142 +cairo_font_options_get_lcd_filter (const cairo_font_options_t *options); 143 + 144 +cairo_public void 145 cairo_set_font_face (cairo_t *cr, cairo_font_face_t *font_face); 146 147 cairo_public cairo_font_face_t * 148 diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h 149 --- a/gfx/cairo/cairo/src/cairoint.h 150 +++ b/gfx/cairo/cairo/src/cairoint.h 151 @@ -891,13 +891,6 @@ cairo_private void 152 _cairo_font_options_fini (cairo_font_options_t *options); 153 154 cairo_private void 155 -_cairo_font_options_set_lcd_filter (cairo_font_options_t *options, 156 - cairo_lcd_filter_t lcd_filter); 157 - 158 -cairo_private cairo_lcd_filter_t 159 -_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options); 160 - 161 -cairo_private void 162 _cairo_font_options_set_round_glyph_positions (cairo_font_options_t *options, 163 cairo_round_glyph_positions_t round);