From 6582f7c4ca15de3ab0b7e8ece08b3c7a0ceb8e58 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sun, 31 Jul 2022 13:32:12 -0500 Subject: [PATCH] rename --- src/pixie/images.nim | 20 ++++++++++---------- src/pixie/simd/sse2.nim | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/pixie/images.nim b/src/pixie/images.nim index 475e8f0..f444328 100644 --- a/src/pixie/images.nim +++ b/src/pixie/images.nim @@ -436,26 +436,26 @@ proc drawCorrect( blended = blender(backdrop, sample) a.unsafe[x, y] = blended -proc blitLine( +proc blendLine( a, b: ptr UncheckedArray[ColorRGBX], len: int, blender: Blender ) {.inline.} = for i in 0 ..< len: a[i] = blender(a[i], b[i]) -proc blitLineOverwrite( +proc blendLineOverwrite( a, b: ptr UncheckedArray[ColorRGBX], len: int ) {.inline.} = copyMem(a[0].addr, b[0].addr, len * 4) -proc blitLineNormal(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]) -proc blitLineMask(a, b: ptr UncheckedArray[ColorRGBX], len: int) {.hasSimd.} = +proc blendLineMask(a, b: ptr UncheckedArray[ColorRGBX], len: int) {.hasSimd.} = for i in 0 ..< len: a[i] = blendMask(a[i], b[i]) -proc blitRect(a, b: Image, pos: Ivec2, blendMode: BlendMode) = +proc blendRect(a, b: Image, pos: Ivec2, blendMode: BlendMode) = let px = pos.x.int py = pos.y.int @@ -474,14 +474,14 @@ proc blitRect(a, b: Image, pos: Ivec2, blendMode: BlendMode) = case blendMode: of NormalBlend: for y in yStart ..< yEnd: - blitLineNormal( + blendLineNormal( a.getUncheckedArray(xStart + px, y + py), b.getUncheckedArray(xStart, y), xEnd - xStart ) of OverwriteBlend: for y in yStart ..< yEnd: - blitLineOverwrite( + blendLineOverwrite( a.getUncheckedArray(xStart + px, y + py), b.getUncheckedArray(xStart, y), xEnd - xStart @@ -493,7 +493,7 @@ proc blitRect(a, b: Image, pos: Ivec2, blendMode: BlendMode) = for y in yStart ..< yEnd: if xStart + px > 0: zeroMem(a.data[a.dataIndex(0, y + py)].addr, (xStart + px) * 4) - blitLineMask( + blendLineMask( a.getUncheckedArray(xStart + px, y + py), b.getUncheckedArray(xStart, y), xEnd - xStart @@ -511,7 +511,7 @@ proc blitRect(a, b: Image, pos: Ivec2, blendMode: BlendMode) = else: let blender = blendMode.blender() for y in yStart ..< yEnd: - blitLine( + blendLine( a.getUncheckedArray(xStart + px, y + py), b.getUncheckedArray(xStart, y), xEnd - xStart, @@ -559,7 +559,7 @@ proc draw*( if hasRotationOrScaling or smooth: a.drawCorrect(b, inverseTransform.inverse(), blendMode, false) else: - a.blitRect(b, ivec2(transform[2, 0].int32, transform[2, 1].int32), blendMode) + a.blendRect(b, ivec2(transform[2, 0].int32, transform[2, 1].int32), blendMode) proc drawTiled*( dst, src: Image, mat: Mat3, blendMode = NormalBlend diff --git a/src/pixie/simd/sse2.nim b/src/pixie/simd/sse2.nim index 1eead85..d611962 100644 --- a/src/pixie/simd/sse2.nim +++ b/src/pixie/simd/sse2.nim @@ -568,7 +568,7 @@ proc blendLineNormalSse2*( for i in i ..< len: line[i] = blendNormal(line[i], rgbx) -proc blitLineNormalSse2*( +proc blendLineNormalSse2*( a, b: ptr UncheckedArray[ColorRGBX], len: int ) {.simd.} = var i: int @@ -653,7 +653,7 @@ proc blendLineMaskSse2*( for i in i ..< len: line[i] = blendMask(line[i], rgbx) -proc blitLineMaskSse2*( +proc blendLineMaskSse2*( a, b: ptr UncheckedArray[ColorRGBX], len: int ) {.simd.} = var i: int