summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kms++util/CMakeLists.txt2
-rw-r--r--kms++util/src/testpat.cpp28
2 files changed, 2 insertions, 28 deletions
diff --git a/kms++util/CMakeLists.txt b/kms++util/CMakeLists.txt
index 2fc15e3..abee194 100644
--- a/kms++util/CMakeLists.txt
+++ b/kms++util/CMakeLists.txt
@@ -7,7 +7,7 @@ target_include_directories(kms++util PUBLIC
$<INSTALL_INTERFACE:include>
PRIVATE src)
-target_link_libraries(kms++util kms++ pthread)
+target_link_libraries(kms++util kms++)
set_target_properties(kms++util PROPERTIES
PUBLIC_HEADER "${PUB_HDRS}")
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)