Link to PDF file (or attach file here):
https://issues.apache.org/jira/secure/attachment/12650283/000004_ShadingPatternTextPDF.pdf

Configuration:
- Web browser and its version: FF 51.0.1 32bit
- Operating system and its version: W7
- PDF.js version: latest

Steps to reproduce the problem:
display file

What is the expected behavior? (add screenshot)
![ok](https://cloud.githubusercontent.com/assets/6665575/23339534/5ff2de9c-fc25-11e6-837e-0fdaf81b4ca9.png)

What went wrong? (add screenshot)
![nok](https://cloud.githubusercontent.com/assets/6665575/23339536/63f7a37e-fc25-11e6-813c-cc218cc4def3.png)

possibly similar problem:
https://www.pdflib.com/fileadmin/pdflib/Cookbook/pdf/color_gradient.pdf (shaded text completely missing)
https://issues.apache.org/jira/secure/attachment/12630566/pslib-shading.pdf (page 4, part of text missing)
https://issues.apache.org/jira/secure/attachment/12652009/pattern-shading-2-4-idMatrix.pdf (some text missing)
https://issues.apache.org/jira/secure/attachment/12652010/pattern-shading-2-4-noMatrix.pdf (some text missing)

maskToCanvas = Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);
    const cord1 = Util.applyTransform([0, 0], maskToCanvas);
    const cord2 = Util.applyTransform([width, height], maskToCanvas);
    const rect = Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]);
    const drawnWidth = Math.ceil(rect[2] - rect[0]);
    const drawnHeight = Math.ceil(rect[3] - rect[1]);
    const fillCanvas = this.cachedCanvases.getCanvas(
      "fillCanvas",
      drawnWidth,
      drawnHeight,
      true
    );
    const fillCtx = fillCanvas.context;
    
    const offsetX = Math.min(cord1[0], cord2[0]);
    const offsetY = Math.min(cord1[1], cord2[1]);
    fillCtx.translate(-offsetX, -offsetY);
    fillCtx.transform.apply(fillCtx, maskToCanvas);
    
    const scaled = this._scaleImage(
      maskCanvas.canvas,
      fillCtx.mozCurrentTransformInverse
    );
    fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled(
      fillCtx.mozCurrentTransform,
      img.interpolate
    );
    fillCtx.drawImage(
      scaled.img,
      0,