diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-06 21:06:15 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-07 14:49:48 +0100 |
commit | 7efd71616ec5efedbe626a986a707c35d3cac323 (patch) | |
tree | 0223e8271d9d18763efd743f43f98b8b8b9e5c2e /gfx/cairo/quartz-const-globals.patch | |
parent | bbc2206a0fda053a6f5071b457bd209dab9ed268 (diff) | |
download | UXP-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/quartz-const-globals.patch')
-rw-r--r-- | gfx/cairo/quartz-const-globals.patch | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/gfx/cairo/quartz-const-globals.patch b/gfx/cairo/quartz-const-globals.patch deleted file mode 100644 index 8db32270a..000000000 --- a/gfx/cairo/quartz-const-globals.patch +++ /dev/null @@ -1,134 +0,0 @@ -# HG changeset patch -# User Robert O'Callahan <robert@ocallahan.org> -# Date 1249558626 -43200 -# Node ID 963b9451ad305924738d05d997a640698cd3af91 -# Parent e564f3ab4ea6e3b5dd9c4e9e6042d3a84c229dde -Bug 508730. Clean up Quartz gradient code by moving some local variables to static const globals. r=jmuizelaar - -diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c ---- a/gfx/cairo/cairo/src/cairo-quartz-surface.c -+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c -@@ -684,51 +684,50 @@ ComputeGradientValue (void *info, const - grad->stops[i-1].color.blue * ap + - grad->stops[i].color.blue * bp; - out[3] = - grad->stops[i-1].color.alpha * ap + - grad->stops[i].color.alpha * bp; - } - } - -+static const float gradient_output_value_ranges[8] = { -+ 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f -+}; -+static const CGFunctionCallbacks gradient_callbacks = { -+ 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy -+}; -+ - static CGFunctionRef - CreateGradientFunction (const cairo_gradient_pattern_t *gpat) - { - cairo_pattern_t *pat; - float input_value_range[2] = { 0.f, 1.f }; -- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f }; -- CGFunctionCallbacks callbacks = { -- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy -- }; - - if (_cairo_pattern_create_copy (&pat, &gpat->base)) - /* quartz doesn't deal very well with malloc failing, so there's - * not much point in us trying either */ - return NULL; - - return CGFunctionCreate (pat, - 1, - input_value_range, - 4, -- output_value_ranges, -- &callbacks); -+ gradient_output_value_ranges, -+ &gradient_callbacks); - } - - static CGFunctionRef - CreateRepeatingLinearGradientFunction (cairo_quartz_surface_t *surface, - const cairo_gradient_pattern_t *gpat, - CGPoint *start, CGPoint *end, - CGAffineTransform matrix) - { - cairo_pattern_t *pat; - float input_value_range[2]; -- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f }; -- CGFunctionCallbacks callbacks = { -- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy -- }; - - CGPoint mstart, mend; - - double dx, dy; - int x_rep_start = 0, x_rep_end = 0; - int y_rep_start = 0, y_rep_end = 0; - - int rep_start, rep_end; -@@ -787,18 +786,18 @@ CreateRepeatingLinearGradientFunction (c - /* quartz doesn't deal very well with malloc failing, so there's - * not much point in us trying either */ - return NULL; - - return CGFunctionCreate (pat, - 1, - input_value_range, - 4, -- output_value_ranges, -- &callbacks); -+ gradient_output_value_ranges, -+ &gradient_callbacks); - } - - static void - UpdateRadialParameterToIncludePoint(double *max_t, CGPoint *center, - double dr, double dx, double dy, - double x, double y) - { - /* Compute a parameter t such that a circle centered at -@@ -847,20 +846,16 @@ CreateRepeatingRadialGradientFunction (c - const cairo_gradient_pattern_t *gpat, - CGPoint *start, double *start_radius, - CGPoint *end, double *end_radius) - { - CGRect clip = CGContextGetClipBoundingBox (surface->cgContext); - CGAffineTransform transform; - cairo_pattern_t *pat; - float input_value_range[2]; -- float output_value_ranges[8] = { 0.f, 1.f, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f }; -- CGFunctionCallbacks callbacks = { -- 0, ComputeGradientValue, (CGFunctionReleaseInfoCallback) cairo_pattern_destroy -- }; - CGPoint *inner; - double *inner_radius; - CGPoint *outer; - double *outer_radius; - /* minimum and maximum t-parameter values that will make our gradient - cover the clipBox */ - double t_min, t_max, t_temp; - /* outer minus inner */ -@@ -927,18 +922,18 @@ CreateRepeatingRadialGradientFunction (c - /* quartz doesn't deal very well with malloc failing, so there's - * not much point in us trying either */ - return NULL; - - return CGFunctionCreate (pat, - 1, - input_value_range, - 4, -- output_value_ranges, -- &callbacks); -+ gradient_output_value_ranges, -+ &gradient_callbacks); - } - - /* Obtain a CGImageRef from a #cairo_surface_t * */ - - static void - DataProviderReleaseCallback (void *info, const void *data, size_t size) - { - cairo_surface_t *surface = (cairo_surface_t *) info; |