mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Re-factor the isLittleEndian
/isEvalSupported
caching
This functionality is very old, hence we should be able to improve the caching a little bit with modern JavaScript features.
This commit is contained in:
parent
27e738dff9
commit
1dc4713a0b
4 changed files with 17 additions and 18 deletions
|
@ -14,11 +14,11 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
FeatureTest,
|
||||
FONT_IDENTITY_MATRIX,
|
||||
IDENTITY_MATRIX,
|
||||
ImageKind,
|
||||
info,
|
||||
IsLittleEndianCached,
|
||||
OPS,
|
||||
shadow,
|
||||
TextRenderingMode,
|
||||
|
@ -702,7 +702,7 @@ function putBinaryImageData(ctx, imgData, transferMaps = null) {
|
|||
const dest32DataLength = dest32.length;
|
||||
const fullSrcDiff = (width + 7) >> 3;
|
||||
let white = 0xffffffff;
|
||||
let black = IsLittleEndianCached.value ? 0xff000000 : 0x000000ff;
|
||||
let black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;
|
||||
|
||||
if (transferMapGray) {
|
||||
if (transferMapGray[0] === 0xff && transferMapGray[0xff] === 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue