morepretty
This commit is contained in:
parent
48d1b17bc4
commit
0f80f9a385
3 changed files with 5 additions and 4 deletions
|
@ -447,7 +447,9 @@ proc blendLineOverwrite(
|
|||
) {.inline.} =
|
||||
copyMem(a[0].addr, b[0].addr, len * 4)
|
||||
|
||||
proc blendLineNormal(a, b: ptr UncheckedArray[ColorRGBX], len: int) {.hasSimd.} =
|
||||
proc blendLineNormal(
|
||||
a, b: ptr UncheckedArray[ColorRGBX], len: int
|
||||
) {.hasSimd.} =
|
||||
for i in 0 ..< len:
|
||||
a[i] = blendNormal(a[i], b[i])
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ proc fillGradientLinear(image: Image, paint: Paint) =
|
|||
t = toLineSpace(at, to, xy)
|
||||
rgbx = paint.gradientColor(t)
|
||||
colors[i] = rgbx
|
||||
|
||||
when defined(amd64):
|
||||
let colorVec = mm_loadu_si128(colors[0].addr)
|
||||
for y in 0 ..< image.height:
|
||||
|
|
|
@ -691,7 +691,7 @@ proc blendLineMaskSse2*(
|
|||
a, b: ptr UncheckedArray[ColorRGBX], len: int
|
||||
) {.simd.} =
|
||||
var i: int
|
||||
while i < len and (cast[uint](a[i].addr) and 15) != 0:
|
||||
while i < len and (cast[uint](a[i].addr) and 15) != 0:
|
||||
a[i] = blendMask(a[i], b[i])
|
||||
inc i
|
||||
|
||||
|
@ -721,7 +721,7 @@ proc blendLineCoverageMaskSse2*(
|
|||
len: int
|
||||
) {.simd.} =
|
||||
var i: int
|
||||
while i < len and (cast[uint](line[i].addr) and 15) != 0:
|
||||
while i < len and (cast[uint](line[i].addr) and 15) != 0:
|
||||
let coverage = coverages[i]
|
||||
if coverage == 0:
|
||||
line[i] = rgbx(0, 0, 0, 0)
|
||||
|
|
Loading…
Reference in a new issue