Merge pull request #14911 from Snuffleupagus/more-TypedArray-fill
Use `TypedArray.prototype.fill()` a bit more in the code-base
This commit is contained in:
commit
96b125fb72
@ -1558,9 +1558,7 @@ class SimpleSegmentVisitor {
|
|||||||
// The contents of ArrayBuffers are initialized to 0.
|
// The contents of ArrayBuffers are initialized to 0.
|
||||||
// Fill the buffer with 0xFF only if info.defaultPixelValue is set
|
// Fill the buffer with 0xFF only if info.defaultPixelValue is set
|
||||||
if (info.defaultPixelValue) {
|
if (info.defaultPixelValue) {
|
||||||
for (let i = 0, ii = buffer.length; i < ii; i++) {
|
buffer.fill(0xff);
|
||||||
buffer[i] = 0xff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.buffer = buffer;
|
this.buffer = buffer;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user