[shotwell] ColorTransformation: Round up slice length
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] ColorTransformation: Round up slice length
- Date: Thu, 9 Nov 2017 13:02:26 +0000 (UTC)
commit e9f8c2498d7364981f1fdf3ab30072e51f4e2720
Author: Jens Georg <mail jensge org>
Date: Tue Nov 7 09:17:37 2017 +0100
ColorTransformation: Round up slice length
Otherwise we miss a couple of lines at the end.
src/ColorTransformation.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/ColorTransformation.vala b/src/ColorTransformation.vala
index 8d9ea8f..0ba8b1d 100644
--- a/src/ColorTransformation.vala
+++ b/src/ColorTransformation.vala
@@ -775,7 +775,7 @@ public class PixelTransformer {
uint slice_length = dest_height;
if (jobs > 0) {
- slice_length = dest_height / jobs;
+ slice_length = (dest_height + (jobs - 1)) / jobs;
}
var threads = new GLib.Thread<void *>[jobs];
@@ -842,7 +842,7 @@ public class PixelTransformer {
uint slice_length = height;
if (jobs > 0) {
- slice_length = height / jobs;
+ slice_length = (height + (jobs - 1)) / jobs;
}
var threads = new GLib.Thread<void*>[jobs];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]