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)

const BORDER_SIZE = 2;
    const offsetX = Math.floor(this._bounds[0]);
    const offsetY = Math.floor(this._bounds[1]);
    const boundsWidth = Math.ceil(this._bounds[2]) - offsetX;
    const boundsHeight = Math.ceil(this._bounds[3]) - offsetY;
    const width = Math.min(
      Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)),
      MAX_PATTERN_SIZE
    );
    const height = Math.min(
      Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)),
      MAX_PATTERN_SIZE
    );
    const scaleX = boundsWidth / width;
    const scaleY = boundsHeight / height;
    const context = {
      coords: this._coords,
      colors: this._colors,
      offsetX: -offsetX,
      offsetY: -offsetY,
      scaleX: 1 / scaleX,
      scaleY: 1 / scaleY,
    };
    const paddedWidth = width + BORDER_SIZE * 2;
    const paddedHeight = height + BORDER_SIZE * 2;
    const tmpCanvas = cachedCanvases.getCanvas(
      "mesh",
      paddedWidth,
      paddedHeight,
      false