mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Use all the current transform as key when caching some image for masks used with pattern fill (bug 1795263, #15573)
This commit is contained in:
parent
15d4d80d45
commit
556513a6e7
4 changed files with 11 additions and 3 deletions
|
@ -1368,11 +1368,12 @@ class CanvasGraphics {
|
|||
// In case we've a pattern fill we just keep the scaled version of
|
||||
// the image.
|
||||
// Only the scaling part matters, the translation part is just used
|
||||
// to compute offsets.
|
||||
// to compute offsets (but not when filling patterns see #15573).
|
||||
// TODO: handle the case of a pattern fill if it's possible.
|
||||
const withoutTranslation = currentTransform.slice(0, 4);
|
||||
cacheKey = JSON.stringify(
|
||||
isPatternFill ? withoutTranslation : [withoutTranslation, fillColor]
|
||||
isPatternFill
|
||||
? currentTransform
|
||||
: [currentTransform.slice(0, 4), fillColor]
|
||||
);
|
||||
|
||||
cache = this._cachedBitmapsMap.get(mainKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue