зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 336bcf9010d1
This commit is contained in:
Родитель
c0dc55c8da
Коммит
d23a008624
|
@ -689,18 +689,15 @@ ComputeGradientValue (void *info, const float *in, float *out)
|
|||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -711,8 +708,8 @@ CreateGradientFunction (const cairo_gradient_pattern_t *gpat)
|
|||
1,
|
||||
input_value_range,
|
||||
4,
|
||||
gradient_output_value_ranges,
|
||||
&gradient_callbacks);
|
||||
output_value_ranges,
|
||||
&callbacks);
|
||||
}
|
||||
|
||||
static CGFunctionRef
|
||||
|
@ -723,6 +720,10 @@ CreateRepeatingLinearGradientFunction (cairo_quartz_surface_t *surface,
|
|||
{
|
||||
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;
|
||||
|
||||
|
@ -791,8 +792,8 @@ CreateRepeatingLinearGradientFunction (cairo_quartz_surface_t *surface,
|
|||
1,
|
||||
input_value_range,
|
||||
4,
|
||||
gradient_output_value_ranges,
|
||||
&gradient_callbacks);
|
||||
output_value_ranges,
|
||||
&callbacks);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -851,6 +852,10 @@ CreateRepeatingRadialGradientFunction (cairo_quartz_surface_t *surface,
|
|||
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;
|
||||
|
@ -927,8 +932,8 @@ CreateRepeatingRadialGradientFunction (cairo_quartz_surface_t *surface,
|
|||
1,
|
||||
input_value_range,
|
||||
4,
|
||||
gradient_output_value_ranges,
|
||||
&gradient_callbacks);
|
||||
output_value_ranges,
|
||||
&callbacks);
|
||||
}
|
||||
|
||||
/* Obtain a CGImageRef from a #cairo_surface_t * */
|
||||
|
|
Загрузка…
Ссылка в новой задаче