Merge branch 'master' into gtk3
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
#include <iostream>
|
||||
#include "mytime.h"
|
||||
|
||||
#ifdef BENCHMARK
|
||||
#define BENCHFUN StopWatch StopFun(__func__);
|
||||
#else
|
||||
#define BENCHFUN
|
||||
#endif
|
||||
|
||||
class StopWatch
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -31,12 +31,14 @@
|
||||
#include "procparams.h"
|
||||
#include "sleef.c"
|
||||
#include "opthelper.h"
|
||||
#include "StopWatch.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh)
|
||||
{
|
||||
BENCHFUN
|
||||
#define HCLIP(x) x //is this still necessary???
|
||||
//min(clip_pt,x)
|
||||
|
||||
|
||||
@@ -683,29 +683,22 @@ CameraConstantsStore::CameraConstantsStore()
|
||||
{
|
||||
}
|
||||
|
||||
static CameraConstantsStore *global_instance;
|
||||
|
||||
void CameraConstantsStore::initCameraConstants(Glib::ustring baseDir, Glib::ustring userSettingsDir)
|
||||
void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSettingsDir)
|
||||
{
|
||||
if (global_instance) {
|
||||
// should only be called once during init.
|
||||
abort();
|
||||
}
|
||||
|
||||
global_instance = new CameraConstantsStore();
|
||||
global_instance->parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json"));
|
||||
parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json"));
|
||||
|
||||
Glib::ustring userFile(Glib::build_filename(userSettingsDir, "camconst.json"));
|
||||
|
||||
if (safe_file_test(userFile, Glib::FILE_TEST_EXISTS)) {
|
||||
global_instance->parse_camera_constants_file(userFile);
|
||||
parse_camera_constants_file(userFile);
|
||||
}
|
||||
}
|
||||
|
||||
CameraConstantsStore *
|
||||
CameraConstantsStore::getInstance(void)
|
||||
{
|
||||
return global_instance;
|
||||
static CameraConstantsStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
CameraConst *
|
||||
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
bool parse_camera_constants_file(Glib::ustring filename);
|
||||
|
||||
public:
|
||||
static void initCameraConstants(Glib::ustring baseDir, Glib::ustring userSettingsDir);
|
||||
void init(Glib::ustring baseDir, Glib::ustring userSettingsDir);
|
||||
static CameraConstantsStore *getInstance(void);
|
||||
CameraConst *get(const char make[], const char model[]);
|
||||
};
|
||||
|
||||
@@ -1691,18 +1691,8 @@ void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int
|
||||
// Generates as singleton
|
||||
DCPStore* DCPStore::getInstance()
|
||||
{
|
||||
static DCPStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new DCPStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static DCPStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
// Reads all profiles from the given profiles dir
|
||||
|
||||
@@ -192,18 +192,8 @@ ICCStore::makeStdGammaProfile(cmsHPROFILE iprof)
|
||||
ICCStore*
|
||||
ICCStore::getInstance(void)
|
||||
{
|
||||
static ICCStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new ICCStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static ICCStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
ICCStore::ICCStore ()
|
||||
|
||||
@@ -46,7 +46,7 @@ int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDi
|
||||
|
||||
dcpStore->init (baseDir + "/dcpprofiles");
|
||||
|
||||
CameraConstantsStore::initCameraConstants (baseDir, userSettingsDir);
|
||||
CameraConstantsStore::getInstance ()->init (baseDir, userSettingsDir);
|
||||
profileStore.init ();
|
||||
ProcParams::init ();
|
||||
Color::init ();
|
||||
|
||||
@@ -781,18 +781,8 @@ void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el)
|
||||
// Generates as singleton
|
||||
LCPStore* LCPStore::getInstance()
|
||||
{
|
||||
static LCPStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new LCPStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static LCPStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
LCPProfile* LCPStore::getProfile (Glib::ustring filename)
|
||||
|
||||
Reference in New Issue
Block a user