Bug 823147 - Avoid moving the start location of non-repeating radial gradients. r=roc

This commit is contained in:
Jeff Muizelaar 2013-01-18 13:28:06 -05:00
Родитель 885a77e67e
Коммит 09afb373df
2 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -2252,6 +2252,15 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
NS_ABORT_IF_FALSE(firstStop >= 0.0, "Failed to fix stop offsets");
}
if (aGradient->mShape != NS_STYLE_GRADIENT_SHAPE_LINEAR && !aGradient->mRepeating) {
// Direct2D can only handle a particular class of radial gradients because
// of the way the it specifies gradients. Setting firstStop to 0, when we
// can, will help us stay on the fast path. Currently we don't do this
// for repeating gradients but we could by adjusting the stop collection
// to start at 0
firstStop = 0;
}
double lastStop = stops[stops.Length() - 1].mPosition;
// Cairo gradients must have stop positions in the range [0, 1]. So,
// stop positions will be normalized below by subtracting firstStop and then

Просмотреть файл

@ -50,9 +50,9 @@ fuzzy-if(!contentSameGfxBackendAsCanvas,1,88500) fails-if(Android) == linear-ver
== linear-zero-length-1c.html linear-zero-length-1-ref.html
== nostops.html about:blank
== onestop.html about:blank
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fails-if(Android) random-if(d2d) == radial-1a.html radial-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fails-if(Android) random-if(d2d) == radial-1b.html radial-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fails-if(Android) random-if(d2d) == radial-1c.html radial-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,51018) fails-if(Android) random-if(d2d) == radial-1a.html radial-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,51018) fails-if(Android) random-if(d2d) == radial-1b.html radial-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,51018) fails-if(Android) random-if(d2d) == radial-1c.html radial-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,3,7860) fails-if(Android) == radial-2a.html radial-2-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,3,7860) fails-if(Android) == radial-2b.html radial-2-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,3,7860) fails-if(Android) == radial-2c.html radial-2-ref.html