mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Avoid rendering errors by passing in the webGLContext
when creating a new CanvasGraphics
in getColorN_Pattern
(PR 9095 follow-up)
This was an oversight in PR 9095, which unfortunately breaks rendering in some PDF files (e.g. the one from issue 6737). It thus appears that we don't have any test-coverage for this code-path, and given the relative complexity of the PDF files affected by this bug I wasn't able to easily create a reduced test-case. *Please note:* The linked test-case included in this patch is currently *not* rendered correctly (that'd be the PR 6606), but it at least gives us some test-coverage here.
This commit is contained in:
parent
fe30d4d468
commit
06605abbc2
3 changed files with 10 additions and 1 deletions
|
@ -1665,7 +1665,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
var canvasGraphicsFactory = {
|
||||
createCanvasGraphics: (ctx) => {
|
||||
return new CanvasGraphics(ctx, this.commonObjs, this.objs,
|
||||
this.canvasFactory);
|
||||
this.canvasFactory, this.webGLContext);
|
||||
},
|
||||
};
|
||||
pattern = new TilingPattern(IR, color, this.ctx, canvasGraphicsFactory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue