improve stability for ICC storage and avoid race conditions.

preparation step 1 for making dcraw multithread safe.
This commit is contained in:
Steve Herrell
2010-10-28 17:31:05 +02:00
parent 6770a2c4a0
commit d22d77c507
9 changed files with 60 additions and 32 deletions

View File

@@ -54,9 +54,14 @@ class ICCStore {
cmsHPROFILE xyz;
cmsHPROFILE srgb;
Glib::Mutex mutex_;
ICCStore ();
public:
ICCStore ();
static ICCStore* getInstance(void);
int numOfWProfiles ();
cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma=false, Glib::ustring name="");
@@ -74,7 +79,7 @@ class ICCStore {
std::vector<std::string> getOutputProfiles ();
};
extern ICCStore iccStore;
#define iccStore ICCStore::getInstance()
//extern const char* wpnames[];
}