summaryrefslogtreecommitdiff
path: root/kms++util/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-20 15:11:23 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-05-22 15:29:16 +0300
commit33246d9b5fb0347aabd62caac1da03440f9e1634 (patch)
tree31609778f8f9e78e264289c5df058136aad36247 /kms++util/src
parentc47a10fcf7e143f948d174d1e50e94f6b094d3f9 (diff)
testpat: remove threaded drawing
Threading causes easily issues with (at least) static linking. Let's just remove it as it's not really that important. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++util/src')
-rw-r--r--kms++util/src/testpat.cpp28
1 files changed, 1 insertions, 27 deletions
diff --git a/kms++util/src/testpat.cpp b/kms++util/src/testpat.cpp
index cf43d00..fee8d8c 100644
--- a/kms++util/src/testpat.cpp
+++ b/kms++util/src/testpat.cpp
@@ -3,7 +3,6 @@
#include <cstring>
#include <cassert>
-#include <thread>
#include <kms++/kms++.h>
#include <kms++util/kms++util.h>
@@ -153,32 +152,7 @@ static void draw_test_pattern_part(IFramebuffer& fb, unsigned start_y, unsigned
static void draw_test_pattern_impl(IFramebuffer& fb, YUVType yuvt)
{
- if (fb.height() < 20) {
- draw_test_pattern_part(fb, 0, fb.height(), yuvt);
- return;
- }
-
- // Create the mmaps before starting the threads
- for (unsigned i = 0; i < fb.num_planes(); ++i)
- fb.map(0);
-
- unsigned num_threads = thread::hardware_concurrency();
- vector<thread> workers;
-
- unsigned part = (fb.height() / num_threads) & ~1;
-
- for (unsigned n = 0; n < num_threads; ++n) {
- unsigned start = n * part;
- unsigned end = start + part;
-
- if (n == num_threads - 1)
- end = fb.height();
-
- workers.push_back(thread([&fb, start, end, yuvt]() { draw_test_pattern_part(fb, start, end, yuvt); }));
- }
-
- for (thread& t : workers)
- t.join();
+ draw_test_pattern_part(fb, 0, fb.height(), yuvt);
}
void draw_test_pattern(IFramebuffer &fb, YUVType yuvt)