rm
This commit is contained in:
parent
0b8d8029f3
commit
316bf1ce4f
1 changed files with 0 additions and 5 deletions
|
@ -71,12 +71,7 @@ proc fillUnsafe*(
|
||||||
) {.hasSimd, raises: [].} =
|
) {.hasSimd, raises: [].} =
|
||||||
## Fills the image data with the color starting at index start and
|
## Fills the image data with the color starting at index start and
|
||||||
## continuing for len indices.
|
## continuing for len indices.
|
||||||
when allowSimd and compiles(fillUnsafeSimd):
|
|
||||||
fillUnsafeSimd(data, start, len, color)
|
|
||||||
return
|
|
||||||
|
|
||||||
let rgbx = color.asRgbx()
|
let rgbx = color.asRgbx()
|
||||||
|
|
||||||
# Use memset when every byte has the same value
|
# Use memset when every byte has the same value
|
||||||
if rgbx.r == rgbx.g and rgbx.r == rgbx.b and rgbx.r == rgbx.a:
|
if rgbx.r == rgbx.g and rgbx.r == rgbx.b and rgbx.r == rgbx.a:
|
||||||
nimSetMem(data[start].addr, rgbx.r.cint, len * 4)
|
nimSetMem(data[start].addr, rgbx.r.cint, len * 4)
|
||||||
|
|
Loading…
Reference in a new issue