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)

Util,
  warn,
} from "../shared/util.js";
import { getShadingPattern, TilingPattern } from "./pattern_helper.js";
import { PixelsPerInch } from "./display_utils.js";
const MIN_FONT_SIZE = 16;
const MAX_FONT_SIZE = 100;
const MAX_GROUP_SIZE = 4096;
const MAX_CACHED_CANVAS_PATTERNS = 2;
const EXECUTION_TIME = 15; 
const EXECUTION_STEPS = 10;
const COMPILE_TYPE3_GLYPHS = true;
const MAX_SIZE_TO_COMPILE = 1000;
const FULL_CHUNK_HEIGHT = 16;
const LINEWIDTH_SCALE_FACTOR = 1.000001;
/**
 * Overrides certain methods on a 2d ctx so that when they are called they
 * will also call the same method on the destCtx. The methods that are
 * overridden are all the transformation state modifiers, path creation, and
 * save/restore. We only forward these specific methods because they are the
 * only state modifiers that we cannot copy over when we switch contexts.
 *
 * To remove mirroring call `ctx._removeMirroring()`.
 *
 * @param {Object} ctx - The 2d canvas context that will duplicate its calls on
 *   the destCtx.
 * @param {Object} destCtx - The 2d canvas context that will receive the
 *   forwarded calls.
 */
function mirrorContextOperations(ctx, destCtx) {