Merge pull request #16722 from calixteman/dont_set_filter
Don't uselessly change the filter when drawing (bug 1508765)
This commit is contained in:
commit
d74b68cd09
@ -790,9 +790,12 @@ function resetCtxToDefault(ctx) {
|
||||
(typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
|
||||
!isNodeJS
|
||||
) {
|
||||
const { filter } = ctx;
|
||||
if (filter !== "none" && filter !== "") {
|
||||
ctx.filter = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function composeSMaskBackdrop(bytes, r0, g0, b0) {
|
||||
const length = bytes.length;
|
||||
@ -2961,8 +2964,11 @@ class CanvasGraphics {
|
||||
// It must be applied to the image before rescaling else some artifacts
|
||||
// could appear.
|
||||
// The final restore will reset it to its value.
|
||||
const { filter } = ctx;
|
||||
if (filter !== "none" && filter !== "") {
|
||||
ctx.filter = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// scale the image to the unit square
|
||||
ctx.scale(1 / width, -1 / height);
|
||||
|
Loading…
x
Reference in New Issue
Block a user