author Jeff Muizelaar Sat, 20 Jul 2013 08:58:10 -0400 changeset 151655 9497f8c1a115b35c444e9f00784adae5cd15df2a parent 151469 cc82635606eb9253c7c85d6e2ac0416ceafaa5b0 child 151749 b9efc80b5c8262f0b1dbe860f362771e224578b2 permissions -rw-r--r--
Bug 895135. Avoid normalizing gradients to a smaller interval than 0..1. r=roc Previously if we had all the stops at the same location, we'd end up putting them all at 0. This makes things harder for backends that implement gradients with a lookup table because they don't have room for multiples entries at the zero location. If instead we leave the stops at the same location on the 0-1 line we'll have a better chance of drawing them correctly.
```
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureSkiaGL,3,89700) == linear-1a.html linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureSkiaGL,3,89700) == linear-1b.html linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureSkiaGL,2,89997) == linear-keywords-1a.html linear-keywords-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureSkiaGL,2,89997) == linear-keywords-1b.html linear-keywords-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) == linear-percent.html linear-percent-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,92400) fuzzy-if(azureSkiaGL,2,143400) == linear-mix.html linear-mix-ref.html
== linear-diagonal-1a.html linear-diagonal-1-ref.html
== linear-diagonal-1b.html linear-diagonal-1-ref.html
== linear-diagonal-1c.html linear-diagonal-1-ref.html
== linear-diagonal-2a.html linear-diagonal-2-ref.html
== linear-diagonal-2b.html linear-diagonal-2-ref.html
== linear-diagonal-2c.html linear-diagonal-2-ref.html
== linear-diagonal-3a.html linear-diagonal-3-ref.html
== linear-diagonal-3b.html linear-diagonal-3-ref.html
== linear-diagonal-3c.html linear-diagonal-3-ref.html
== linear-diagonal-4a.html linear-diagonal-4-ref.html
== linear-diagonal-4b.html linear-diagonal-4-ref.html
== linear-diagonal-4c.html linear-diagonal-4-ref.html
fuzzy(2,11356) == linear-diagonal-5a.html linear-diagonal-5-ref.html
fuzzy(2,11657) == linear-diagonal-6a.html linear-diagonal-6-ref.html
fuzzy(2,11298) == linear-diagonal-7a.html linear-diagonal-7-ref.html
fuzzy(2,11443) == linear-diagonal-8a.html linear-diagonal-8-ref.html
== linear-diagonal-9a.html linear-diagonal-9-ref.html
fuzzy(1,800000) == linear-flipped-1.html linear-flipped-1-ref.html
== linear-position-1a.html linear-position-1-ref.html
== linear-repeat-1a.html linear-repeat-1-ref.html
fails-if(d2d) == linear-repeat-1b.html linear-repeat-1-ref.html # bug 582236
== linear-repeat-1c.html linear-repeat-1-ref.html
fails-if(d2d) == linear-repeat-1d.html linear-repeat-1-ref.html # bug 582236
== linear-repeat-1e.html linear-repeat-1-ref.html
fails-if(d2d) == linear-repeat-1f.html linear-repeat-1-ref.html # bug 582236
fails-if(d2d) == linear-repeat-1g.html linear-repeat-1-ref.html # bug 582236
== linear-rotated-1.html linear-rotated-1-ref.html
== linear-size-1a.html linear-size-1-ref.html
== linear-stops-1a.html linear-stops-1-ref.html
== linear-stops-1b.html linear-stops-1-ref.html
== linear-stops-1c.html linear-stops-1-ref.html
== linear-stops-1d.html linear-stops-1-ref.html
== linear-stops-1e.html linear-stops-1-ref.html
== linear-stops-1f.html linear-stops-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,88500) fuzzy-if(azureSkiaGL,2,89700) == linear-vertical-1a.html linear-vertical-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,88500) fuzzy-if(azureSkiaGL,2,89700) == linear-vertical-1b.html linear-vertical-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,88500) fuzzy-if(azureSkiaGL,2,89700) == linear-vertical-1c.html linear-vertical-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,88500) fuzzy-if(azureSkiaGL,2,89700) == linear-vertical-1d.html linear-vertical-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,88500) fuzzy-if(azureSkiaGL,2,89700) == linear-vertical-1e.html linear-vertical-1-ref.html
== linear-vertical-subpixel-1.html linear-vertical-subpixel-1-ref.html
== linear-viewport.html linear-viewport-ref.html
== linear-zero-length-1a.html linear-zero-length-1-ref.html
== linear-zero-length-1b.html linear-zero-length-1-ref.html
== linear-zero-length-1c.html linear-zero-length-1-ref.html
== repeating-linear-1a.html repeating-linear-1-ref.html
== repeating-linear-1b.html repeating-linear-1-ref.html
== repeating-linear-2a.html repeating-linear-2-ref.html
== twostops-1a.html twostops-1-ref.html
== twostops-1b.html twostops-1-ref.html
== twostops-1c.html twostops-1-ref.html
== twostops-1d.html twostops-1-ref.html
== twostops-1e.html twostops-1-ref.html
== twostops-1f.html twostops-1-ref.html
== twostops-1g.html twostops-1-ref.html

# from http://www.xanthir.com/:4bhipd by way of http://a-ja.net/newgrad.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-1a.html aja-linear-1-ref.html
fails-if(!d2d) == aja-linear-1b.html aja-linear-1-ref.html # bug 526694
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-1c.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-1d.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-1e.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-1f.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-1g.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-2a.html aja-linear-2-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-2b.html aja-linear-2-ref.html
fails == aja-linear-2c.html aja-linear-2-ref.html # bug 522607
fails-if(!d2d) == aja-linear-2d.html aja-linear-2-ref.html # bug 526694
fuzzy-if(!contentSameGfxBackendAsCanvas,1,19999) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-3a.html aja-linear-3-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,19999) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-3b.html aja-linear-3-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-4a.html aja-linear-4-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-4b.html aja-linear-4-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,20000) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-5a.html aja-linear-5-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,2,16477) fuzzy-if(azureSkiaGL,8,20000) == aja-linear-6a.html aja-linear-6-ref.html # bug 526708
fails == aja-linear-6b.html aja-linear-6-ref.html # bug 522607
skip-if(B2G) == height-dependence-1.html height-dependence-1-ref.html
skip-if(B2G) fuzzy-if(cocoaWidget,1,40000) == height-dependence-2.html height-dependence-2-ref.html
skip-if(B2G) == height-dependence-3.html height-dependence-3-ref.html

== linear-onestopposition-1.html linear-onestopposition-1-ref.html
fuzzy-if(d2d,47,400) == linear-onestopposition-1.html linear-onestopposition-1-ref2.html # d2d interpolates the hard stop