summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/text-path-filling-threshold.patch
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-06 21:06:15 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-07 14:49:48 +0100
commit7efd71616ec5efedbe626a986a707c35d3cac323 (patch)
tree0223e8271d9d18763efd743f43f98b8b8b9e5c2e /gfx/cairo/text-path-filling-threshold.patch
parentbbc2206a0fda053a6f5071b457bd209dab9ed268 (diff)
downloadUXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar.gz
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar.lz
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.tar.xz
UXP-7efd71616ec5efedbe626a986a707c35d3cac323.zip
Issue #1274 - Part 1: Adopt the cairo version as our own.
- Move header licensing from tri-license to MPL 2.0. MPL-compatible other licensing has been retained where originally present. - Remove individual superseded licensing terms. - Remove patches, outdated readmes & incomplete patch summaries. - Remove incomplete cairo release notes (only went up to 1.6.4 anyway). - Rewrite COPYING to indicate the current state of the library in tree.
Diffstat (limited to 'gfx/cairo/text-path-filling-threshold.patch')
-rw-r--r--gfx/cairo/text-path-filling-threshold.patch90
1 files changed, 0 insertions, 90 deletions
diff --git a/gfx/cairo/text-path-filling-threshold.patch b/gfx/cairo/text-path-filling-threshold.patch
deleted file mode 100644
index 69efce093..000000000
--- a/gfx/cairo/text-path-filling-threshold.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
---- a/gfx/cairo/cairo/src/cairo-gstate.c
-+++ b/gfx/cairo/cairo/src/cairo-gstate.c
-@@ -1673,26 +1673,31 @@ _cairo_gstate_show_text_glyphs (cairo_gs
-
- source_pattern = &source_pattern_stack.base;
- status = _cairo_gstate_copy_transformed_source (gstate, &source_pattern);
- if (unlikely (status))
- goto CLEANUP_GLYPHS;
-
- /* For really huge font sizes, we can just do path;fill instead of
- * show_glyphs, as show_glyphs would put excess pressure on the cache,
-- * and moreover, not all components below us correctly handle huge font
-- * sizes. I wanted to set the limit at 256. But alas, seems like cairo's
-+ * not all components below us correctly handle huge font sizes, and
-+ * path filling can be cheaper since parts of glyphs are likely to be
-+ * clipped out. 256 seems like a good limit. But alas, seems like cairo's
- * rasterizer is something like ten times slower than freetype's for huge
-- * sizes. So, no win just yet. For now, do it for insanely-huge sizes,
-- * just to make sure we don't make anyone unhappy. When we get a really
-- * fast rasterizer in cairo, we may want to readjust this.
-+ * sizes. So, no win just yet when we're using cairo's rasterizer.
-+ * For now, if we're using cairo's rasterizer, use path filling only
-+ * for insanely-huge sizes, just to make sure we don't make anyone
-+ * unhappy. When we get a really fast rasterizer in cairo, we may
-+ * want to readjust this. The threshold calculation is
-+ * encapsulated in _cairo_surface_get_text_path_fill_threshold.
- *
- * Needless to say, do this only if show_text_glyphs is not available. */
- if (cairo_surface_has_show_text_glyphs (gstate->target) ||
-- _cairo_scaled_font_get_max_scale (gstate->scaled_font) <= 10240) {
-+ _cairo_scaled_font_get_max_scale (gstate->scaled_font) <=
-+ _cairo_surface_get_text_path_fill_threshold (gstate->target)) {
- status = _cairo_surface_show_text_glyphs (gstate->target,
- gstate->op,
- source_pattern,
- utf8, utf8_len,
- transformed_glyphs, num_glyphs,
- transformed_clusters, num_clusters,
- cluster_flags,
- gstate->scaled_font, NULL);
-diff --git a/gfx/cairo/cairo/src/cairo-surface.c b/gfx/cairo/cairo/src/cairo-surface.c
---- a/gfx/cairo/cairo/src/cairo-surface.c
-+++ b/gfx/cairo/cairo/src/cairo-surface.c
-@@ -1120,16 +1120,22 @@ cairo_surface_get_fallback_resolution (c
- double *y_pixels_per_inch)
- {
- if (x_pixels_per_inch)
- *x_pixels_per_inch = surface->x_fallback_resolution;
- if (y_pixels_per_inch)
- *y_pixels_per_inch = surface->y_fallback_resolution;
- }
-
-+int
-+_cairo_surface_get_text_path_fill_threshold (const cairo_surface_t *surface)
-+{
-+ return surface->backend->fill == NULL ? 10240 : 256;
-+}
-+
- cairo_bool_t
- _cairo_surface_has_device_transform (cairo_surface_t *surface)
- {
- return ! _cairo_matrix_is_identity (&surface->device_transform);
- }
-
- /**
- * _cairo_surface_acquire_source_image:
-diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h
---- a/gfx/cairo/cairo/src/cairoint.h
-+++ b/gfx/cairo/cairo/src/cairoint.h
-@@ -2065,16 +2065,19 @@ _cairo_surface_composite_shape_fixup_unb
- int dst_x,
- int dst_y,
- unsigned int width,
- unsigned int height);
-
- cairo_private cairo_bool_t
- _cairo_surface_is_opaque (const cairo_surface_t *surface);
-
-+cairo_private int
-+_cairo_surface_get_text_path_fill_threshold (const cairo_surface_t *surface);
-+
- cairo_private void
- _cairo_surface_set_device_scale (cairo_surface_t *surface,
- double sx,
- double sy);
-
- cairo_private cairo_bool_t
- _cairo_surface_has_device_transform (cairo_surface_t *surface);
-