Using Steves threadsafe DCRAW to roughly double thumbnail generation speed on multicore CPUs. Now there are two update worker threads. Easy to remove if someone provides code for a more efficient distribution mechanism.
This commit is contained in:
@@ -970,3 +970,25 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void PreviewMultiLoader::setPreviewLoaderListener (PreviewLoaderListener* p) {
|
||||
loadA.setPreviewLoaderListener(p); loadB.setPreviewLoaderListener(p);
|
||||
}
|
||||
|
||||
// Simple round robin
|
||||
void PreviewMultiLoader::add(DirEntry de) {
|
||||
if (next==0) {
|
||||
loadA.add(de);
|
||||
next=1;
|
||||
} else {
|
||||
loadB.add(de);
|
||||
next=0;
|
||||
}
|
||||
}
|
||||
|
||||
void PreviewMultiLoader::start () { loadA.start(); loadB.start(); }
|
||||
void PreviewMultiLoader::process () { loadA.process (); loadB.process(); }
|
||||
void PreviewMultiLoader::remove (Glib::ustring fname) { loadA.remove(fname); loadB.remove(fname); }
|
||||
void PreviewMultiLoader::end () { loadA.end(); loadB.end(); }
|
||||
bool PreviewMultiLoader::runs () { return loadA.runs() || loadB.runs(); }
|
||||
void PreviewMultiLoader::terminate () { loadA.terminate(); loadB.terminate(); }
|
||||
void PreviewMultiLoader::stop () { loadA.stop(); loadB.stop(); }
|
||||
|
Reference in New Issue
Block a user