Lines Matching refs:aStops

283                                            const nsTArray<ColorStop>& aStops,  in RectIsBeyondLinearGradientEdge()  argument
300 const ColorStop& firstStop = aStops[0]; in RectIsBeyondLinearGradientEdge()
307 const ColorStop& lastStop = aStops.LastElement(); in RectIsBeyondLinearGradientEdge()
404 static void ResolvePremultipliedAlpha(nsTArray<ColorStop>& aStops) { in ResolvePremultipliedAlpha() argument
405 for (size_t x = 1; x < aStops.Length(); x++) { in ResolvePremultipliedAlpha()
406 const ColorStop leftStop = aStops[x - 1]; in ResolvePremultipliedAlpha()
407 const ColorStop rightStop = aStops[x]; in ResolvePremultipliedAlpha()
420 aStops[x - 1].mColor = TransparentColor(rightStop.mColor); in ResolvePremultipliedAlpha()
429 aStops.InsertElementAt(x, newStop); in ResolvePremultipliedAlpha()
450 aStops.InsertElementAt(x, newStop); in ResolvePremultipliedAlpha()
477 static void ClampColorStops(nsTArray<ColorStop>& aStops) { in ClampColorStops() argument
478 MOZ_ASSERT(aStops.Length() > 0); in ClampColorStops()
482 if (aStops.Length() < 2 || aStops[0].mPosition > 1 || in ClampColorStops()
483 aStops.LastElement().mPosition < 0) { in ClampColorStops()
484 sRGBColor c = aStops[0].mPosition > 1 ? aStops[0].mColor in ClampColorStops()
485 : aStops.LastElement().mColor; in ClampColorStops()
486 aStops.Clear(); in ClampColorStops()
487 aStops.AppendElement(ColorStop(0, false, c)); in ClampColorStops()
495 for (size_t i = aStops.Length() - 1; i > 0; i--) { in ClampColorStops()
496 if (aStops[i - 1].mPosition < 1 && aStops[i].mPosition >= 1) { in ClampColorStops()
498 aStops[i] = in ClampColorStops()
499 InterpolateColorStop(aStops[i - 1], aStops[i], in ClampColorStops()
500 /* aPosition = */ 1, aStops[i - 1].mColor); in ClampColorStops()
502 aStops.RemoveLastElements(aStops.Length() - (i + 1)); in ClampColorStops()
504 if (aStops[i - 1].mPosition <= 0 && aStops[i].mPosition > 0) { in ClampColorStops()
506 aStops[i - 1] = in ClampColorStops()
507 InterpolateColorStop(aStops[i - 1], aStops[i], in ClampColorStops()
508 /* aPosition = */ 0, aStops[i].mColor); in ClampColorStops()
510 aStops.RemoveElementsAt(0, i - 1); in ClampColorStops()
515 MOZ_ASSERT(aStops[0].mPosition >= -1e6); in ClampColorStops()
516 MOZ_ASSERT(aStops.LastElement().mPosition - 1 <= 1e6); in ClampColorStops()
520 if (aStops[0].mPosition > 0) { in ClampColorStops()
521 aStops.InsertElementAt(0, ColorStop(0, false, aStops[0].mColor)); in ClampColorStops()
523 if (aStops.LastElement().mPosition < 1) { in ClampColorStops()
524 aStops.AppendElement(ColorStop(1, false, aStops.LastElement().mColor)); in ClampColorStops()
1168 float aOpacity, wr::ExtendMode& aMode, nsTArray<wr::GradientStop>& aStops, in BuildWebRenderParameters() argument
1175 aStops.SetLength(mStops.Length()); in BuildWebRenderParameters()
1177 aStops[i].color = wr::ToColorF(ToDeviceColor(mStops[i].mColor)); in BuildWebRenderParameters()
1178 aStops[i].color.a *= aOpacity; in BuildWebRenderParameters()
1179 aStops[i].offset = mStops[i].mPosition; in BuildWebRenderParameters()