Attach (recommended) or Link to PDF file here:
[bug.pdf](https://github.com/mozilla/pdf.js/files/2886648/bug.pdf)
Also available at https://bug1529152.bmoattachments.org/attachment.cgi?id=9045439


Configuration:
- Web browser and its version: Firefox Nightly 67.0a1 (2019-02-20) (64-bit)
- Operating system and its version: Linux (64-bit Ubuntu 18.10)
- PDF.js version: whatever is bundled with current Nightly
- Is a browser extension: No (using built-in version, which is not listed in extensions)

Steps to reproduce the problem:
1. View [attached PDF](https://github.com/mozilla/pdf.js/files/2886648/bug.pdf)) in PDF.js (e.g. via Firefox Nightly built-in PDF viewer).  It's also hosted here: https://bug1529152.bmoattachments.org/attachment.cgi?id=9045439
This PDF was generated from an [HTML testcase](https://bugzilla.mozilla.org/attachment.cgi?id=9045438) that has a repeating-linear-gradient with "hard stops" (0-100px all the same color, 100-200px all the same color, & repeat)

What is the expected behavior?
There should be **solid stripes** of blue and lime.  There shouldn't be any blurring between the colors.  I think there should be 6 total stripes, though different viewers seem to disagree (Safari+Edge render 6 stripes; Chrome renders a tiny blue stripe at the top; Evince renders 3 broad stripes)  But bottom line, there should be distinct solid-colored stripes. Here's a screenshot of the Chrome built-in PDF viewer's rendering:
![image](https://user-images.githubusercontent.com/426803/53128057-c8735680-3518-11e9-82fa-f75d733bda44.png)

What went wrong?
PDF.js renders a gradual gradient from lime to blue (but mostly lime).  Here's a screenshot:
![image](https://user-images.githubusercontent.com/426803/53127935-6f0b2780-3518-11e9-8f77-6d1998150ee0.png)
}
    const color = new Float32Array(cs.numComps),
      ratio = new Float32Array(1);
    let rgbColor;
    for (let i = 0; i <= NUMBER_OF_SAMPLES; i++) {
      ratio[0] = t0 + i * step;
      fn(ratio, 0, color, 0);
      rgbColor = cs.getRgb(color, 0);
      const cssColor = Util.makeHexColor(rgbColor[0], rgbColor[1], rgbColor[2]);
      colorStops.push([i / NUMBER_OF_SAMPLES, cssColor]);
    }
    let background = "transparent";
    if (dict.has("Background")) {
      rgbColor = cs.getRgb(dict.get("Background"), 0);
      background = Util.makeHexColor(rgbColor[0], rgbColor[1], rgbColor[2]);
    }
    if (!extendStart) {
      
      
      colorStops.unshift([0, background]);
      colorStops[1][0] += BaseShading.SMALL_NUMBER;
    }
    if (!extendEnd) {
      
      colorStops.at(-1)[0] -= BaseShading.SMALL_NUMBER;
      colorStops.push([1, background]);
    }
    this.colorStops = colorStops;
  }
  getIR() {