raster: added default task name 93/294093/1
authorMichal Szczecinski <mihashco89@gmail.com>
Tue, 13 Jun 2023 04:33:04 +0000 (06:33 +0200)
committerMichal Szczecinski <m.szczecinsk@partner.samsung.com>
Tue, 13 Jun 2023 04:54:58 +0000 (06:54 +0200)
Change-Id: I73b902c89de179e1cce86dd98ab0d9f411d39cc5

src/vector/vraster.cpp

index fdf66fb01b6c50677629e7ebf046c0cc1e452b1b..8ef7b57132593d011a135ce2520efd06131f96bb 100644 (file)
@@ -420,6 +420,11 @@ using VTask = std::shared_ptr<VRleTask>;
 #include <thread>
 #include "vtaskqueue.h"
 
+#ifdef __linux__
+#include <pthread.h>
+#include <sstream>
+#endif
+
 class RleTaskScheduler {
     const unsigned                _count{std::thread::hardware_concurrency()};
     std::vector<std::thread>      _threads;
@@ -435,6 +440,13 @@ class RleTaskScheduler {
         SW_FT_Stroker stroker;
         SW_FT_Stroker_New(&stroker);
 
+        // Create Thread Name for Debugging (Linux)
+#ifdef __linux__
+        std::ostringstream nameStream;
+        nameStream << "lottie-tsk-" << i;
+        pthread_setname_np(pthread_self(), nameStream.str().c_str());
+#endif
+
         // Task Loop
         VTask task;
         while (true) {