Partially solving issue 1788: "Crashing during processing of queue"
It also correct a bug of wrong image orientation (was wrong in the File Browser while good in the Editor tab) This patch also introduce several speed optimizations like: - switch between File Browser and Editor tab in Single Editor mode - asynchronous computation of the Batch Queue's thumbnails - quick start of RT even with a huge queue - less GUI overhead when applying a profile to multiple thumbs in the File Browser
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
// This file is for your program, I won't touch it again!
|
||||
|
||||
#include "config.h"
|
||||
#include <glibmm/thread.h>
|
||||
#include <gtkmm.h>
|
||||
#include <giomm.h>
|
||||
#include <iostream>
|
||||
@@ -53,6 +54,22 @@ Glib::ustring creditsPath;
|
||||
Glib::ustring licensePath;
|
||||
Glib::ustring argv1;
|
||||
bool simpleEditor;
|
||||
Glib::Thread* mainThread;
|
||||
|
||||
|
||||
// This recursive mutex will be used by g_thread_enter/leave instead of a simple mutex
|
||||
static Glib::RecMutex myGdkRecMutex;
|
||||
|
||||
static void myGdkLockEnter() { myGdkRecMutex.lock(); }
|
||||
static void myGdkLockLeave() {
|
||||
// Automatic gdk_flush for non main tread
|
||||
#if AUTO_GDK_FLUSH
|
||||
if (Glib::Thread::self() != mainThread) {
|
||||
gdk_flush();
|
||||
}
|
||||
#endif
|
||||
myGdkRecMutex.unlock();
|
||||
}
|
||||
|
||||
/* Process line command options
|
||||
* Returns
|
||||
@@ -105,9 +122,12 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
Glib::thread_init();
|
||||
gdk_threads_set_lock_functions(G_CALLBACK(myGdkLockEnter), ((GCallback) (myGdkLockLeave)));
|
||||
gdk_threads_init();
|
||||
Gio::init ();
|
||||
|
||||
mainThread = Glib::Thread::self();
|
||||
|
||||
Options::load ();
|
||||
extProgStore->init();
|
||||
SoundManager::init();
|
||||
@@ -158,9 +178,8 @@ int main(int argc, char **argv)
|
||||
printf("Error: no default settings to update!\n");
|
||||
#endif
|
||||
|
||||
|
||||
RTWindow *rtWindow = new class RTWindow();
|
||||
gdk_threads_enter ();
|
||||
RTWindow *rtWindow = new class RTWindow();
|
||||
|
||||
// alerting users if the default raw and image profiles are missing
|
||||
if (options.is_defProfRawMissing()) {
|
||||
|
Reference in New Issue
Block a user