Merge pull request #16368 from Snuffleupagus/rm-GlobalImageCache-addPageIndex

Inline the `addPageIndex` method in `GlobalImageCache.shouldCache`
This commit is contained in:
Jonas Jenwald 2023-05-04 12:09:04 +02:00 committed by GitHub
commit 667085ee33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 19 deletions

View file

@ -822,10 +822,9 @@ class PartialEvaluator {
if (imageRef) {
this._regionalImageCache.set(/* name = */ null, imageRef, cacheData);
assert(!isInline, "Cannot cache an inline image globally.");
this.globalImageCache.addPageIndex(imageRef, this.pageIndex);
if (cacheGlobally) {
assert(!isInline, "Cannot cache an inline image globally.");
this.globalImageCache.setData(imageRef, {
objId,
fn: OPS.paintImageXObject,