Skip pixel translation in blur if no offset or strength change
This commit is contained in:
@@ -781,30 +781,32 @@ class ImageDataUtil {
|
||||
bIndex += 2;
|
||||
}
|
||||
|
||||
var x: Int;
|
||||
var y: Int;
|
||||
if (offset <= 0) {
|
||||
y = 0;
|
||||
while (y < h) {
|
||||
x = 0;
|
||||
while (x < w) {
|
||||
translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength);
|
||||
x += 1;
|
||||
var x:Int;
|
||||
var y:Int;
|
||||
if (offset != 0 || strength != 1) {
|
||||
if (offset <= 0) {
|
||||
y = 0;
|
||||
while (y < h) {
|
||||
x = 0;
|
||||
while (x < w) {
|
||||
translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength);
|
||||
x += 1;
|
||||
}
|
||||
y += 1;
|
||||
}
|
||||
y += 1;
|
||||
}
|
||||
} else {
|
||||
y = h-1;
|
||||
while (y >= 0 ) {
|
||||
x = w-1;
|
||||
while (x >= 0) {
|
||||
translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength);
|
||||
x -= 1;
|
||||
} else {
|
||||
y = h-1;
|
||||
while (y >= 0 ) {
|
||||
x = w-1;
|
||||
while (x >= 0) {
|
||||
translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength);
|
||||
x -= 1;
|
||||
}
|
||||
y -= 1;
|
||||
}
|
||||
y -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
image.dirty = true;
|
||||
image.version++;
|
||||
sourceImage.dirty = true;
|
||||
|
||||
Reference in New Issue
Block a user