Lines Matching refs:aStops

284                                            const nsTArray<ColorStop>& aStops,  in RectIsBeyondLinearGradientEdge()  argument
301 const ColorStop& firstStop = aStops[0]; in RectIsBeyondLinearGradientEdge()
308 const ColorStop& lastStop = aStops.LastElement(); in RectIsBeyondLinearGradientEdge()
405 static void ResolvePremultipliedAlpha(nsTArray<ColorStop>& aStops) { in ResolvePremultipliedAlpha() argument
406 for (size_t x = 1; x < aStops.Length(); x++) { in ResolvePremultipliedAlpha()
407 const ColorStop leftStop = aStops[x - 1]; in ResolvePremultipliedAlpha()
408 const ColorStop rightStop = aStops[x]; in ResolvePremultipliedAlpha()
421 aStops[x - 1].mColor = TransparentColor(rightStop.mColor); in ResolvePremultipliedAlpha()
430 aStops.InsertElementAt(x, newStop); in ResolvePremultipliedAlpha()
451 aStops.InsertElementAt(x, newStop); in ResolvePremultipliedAlpha()
478 static void ClampColorStops(nsTArray<ColorStop>& aStops) { in ClampColorStops() argument
479 MOZ_ASSERT(aStops.Length() > 0); in ClampColorStops()
483 if (aStops.Length() < 2 || aStops[0].mPosition > 1 || in ClampColorStops()
484 aStops.LastElement().mPosition < 0) { in ClampColorStops()
485 sRGBColor c = aStops[0].mPosition > 1 ? aStops[0].mColor in ClampColorStops()
486 : aStops.LastElement().mColor; in ClampColorStops()
487 aStops.Clear(); in ClampColorStops()
488 aStops.AppendElement(ColorStop(0, false, c)); in ClampColorStops()
496 for (size_t i = aStops.Length() - 1; i > 0; i--) { in ClampColorStops()
497 if (aStops[i - 1].mPosition < 1 && aStops[i].mPosition >= 1) { in ClampColorStops()
499 aStops[i] = in ClampColorStops()
500 InterpolateColorStop(aStops[i - 1], aStops[i], in ClampColorStops()
501 /* aPosition = */ 1, aStops[i - 1].mColor); in ClampColorStops()
503 aStops.RemoveLastElements(aStops.Length() - (i + 1)); in ClampColorStops()
505 if (aStops[i - 1].mPosition <= 0 && aStops[i].mPosition > 0) { in ClampColorStops()
507 aStops[i - 1] = in ClampColorStops()
508 InterpolateColorStop(aStops[i - 1], aStops[i], in ClampColorStops()
509 /* aPosition = */ 0, aStops[i].mColor); in ClampColorStops()
511 aStops.RemoveElementsAt(0, i - 1); in ClampColorStops()
516 MOZ_ASSERT(aStops[0].mPosition >= -1e6); in ClampColorStops()
517 MOZ_ASSERT(aStops.LastElement().mPosition - 1 <= 1e6); in ClampColorStops()
521 if (aStops[0].mPosition > 0) { in ClampColorStops()
522 aStops.InsertElementAt(0, ColorStop(0, false, aStops[0].mColor)); in ClampColorStops()
524 if (aStops.LastElement().mPosition < 1) { in ClampColorStops()
525 aStops.AppendElement(ColorStop(1, false, aStops.LastElement().mColor)); in ClampColorStops()
1169 float aOpacity, wr::ExtendMode& aMode, nsTArray<wr::GradientStop>& aStops, in BuildWebRenderParameters() argument
1176 aStops.SetLength(mStops.Length()); in BuildWebRenderParameters()
1178 aStops[i].color = wr::ToColorF(ToDeviceColor(mStops[i].mColor)); in BuildWebRenderParameters()
1179 aStops[i].color.a *= aOpacity; in BuildWebRenderParameters()
1180 aStops[i].offset = mStops[i].mPosition; in BuildWebRenderParameters()