Merge pull request from Snuffleupagus/more-TypedArray-fill

Use `TypedArray.prototype.fill()` a bit more in the code-base
This commit is contained in:
Jonas Jenwald 2022-05-13 13:47:17 +02:00 committed by GitHub
commit 96b125fb72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1558,9 +1558,7 @@ class SimpleSegmentVisitor {
// The contents of ArrayBuffers are initialized to 0.
// Fill the buffer with 0xFF only if info.defaultPixelValue is set
if (info.defaultPixelValue) {
for (let i = 0, ii = buffer.length; i < ii; i++) {
buffer[i] = 0xff;
}
buffer.fill(0xff);
}
this.buffer = buffer;
}