Update to new release candidate version.
This commit is contained in:
parent
b23185b729
commit
8c4037a162
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ lcms2-2.0a.tar.gz
|
|||||||
/lcms2-2.2.tar.gz
|
/lcms2-2.2.tar.gz
|
||||||
/lcms2-2.3.tar.gz
|
/lcms2-2.3.tar.gz
|
||||||
/lcms2-2.4.tar.gz
|
/lcms2-2.4.tar.gz
|
||||||
|
/lcms2-2.5rc1.tar.gz
|
||||||
|
@ -1,470 +0,0 @@
|
|||||||
diff -up lcms2-2.4/include/lcms2.h.threading-plugin lcms2-2.4/include/lcms2.h
|
|
||||||
--- lcms2-2.4/include/lcms2.h.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/include/lcms2.h 2013-04-25 15:45:02.853816514 +0100
|
|
||||||
@@ -985,6 +985,7 @@ CMSAPI long int CMSEXPORT cmsfi
|
|
||||||
// Plug-In registering ---------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
CMSAPI cmsBool CMSEXPORT cmsPlugin(void* Plugin);
|
|
||||||
+CMSAPI cmsBool CMSEXPORT cmsPluginTHR(cmsContext ContextID, void* Plugin);
|
|
||||||
CMSAPI void CMSEXPORT cmsUnregisterPlugins(void);
|
|
||||||
|
|
||||||
// Error logging ----------------------------------------------------------------------------------------------------------
|
|
||||||
diff -up lcms2-2.4/src/cmscnvrt.c.threading-plugin lcms2-2.4/src/cmscnvrt.c
|
|
||||||
--- lcms2-2.4/src/cmscnvrt.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmscnvrt.c 2013-04-25 15:45:02.854816518 +0100
|
|
||||||
@@ -1028,7 +1028,7 @@ cmsUInt32Number CMSEXPORT cmsGetSupporte
|
|
||||||
}
|
|
||||||
|
|
||||||
// The plug-in registration. User can add new intents or override default routines
|
|
||||||
-cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
cmsPluginRenderingIntent* Plugin = (cmsPluginRenderingIntent*) Data;
|
|
||||||
cmsIntentsList* fl;
|
|
||||||
@@ -1043,7 +1043,7 @@ cmsBool _cmsRegisterRenderingIntentPlug
|
|
||||||
fl = SearchIntent(Plugin ->Intent);
|
|
||||||
|
|
||||||
if (fl == NULL) {
|
|
||||||
- fl = (cmsIntentsList*) _cmsPluginMalloc(sizeof(cmsIntentsList));
|
|
||||||
+ fl = (cmsIntentsList*) _cmsPluginMalloc(id, sizeof(cmsIntentsList));
|
|
||||||
if (fl == NULL) return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -up lcms2-2.4/src/cmsgamma.c.threading-plugin lcms2-2.4/src/cmsgamma.c
|
|
||||||
--- lcms2-2.4/src/cmsgamma.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmsgamma.c 2013-04-25 15:45:02.855816522 +0100
|
|
||||||
@@ -70,7 +70,7 @@ static _cmsParametricCurvesCollection De
|
|
||||||
static _cmsParametricCurvesCollection* ParametricCurves = &DefaultCurves;
|
|
||||||
|
|
||||||
// As a way to install new parametric curves
|
|
||||||
-cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
cmsPluginParametricCurves* Plugin = (cmsPluginParametricCurves*) Data;
|
|
||||||
_cmsParametricCurvesCollection* fl;
|
|
||||||
@@ -81,7 +81,7 @@ cmsBool _cmsRegisterParametricCurvesPlug
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(sizeof(_cmsParametricCurvesCollection));
|
|
||||||
+ fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(id, sizeof(_cmsParametricCurvesCollection));
|
|
||||||
if (fl == NULL) return FALSE;
|
|
||||||
|
|
||||||
// Copy the parameters
|
|
||||||
diff -up lcms2-2.4/src/cmsio0.c.threading-plugin lcms2-2.4/src/cmsio0.c
|
|
||||||
--- lcms2-2.4/src/cmsio0.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmsio0.c 2013-04-25 15:46:28.537183522 +0100
|
|
||||||
@@ -1057,6 +1057,7 @@ cmsBool SaveTags(_cmsICCPROFILE* Icc, _c
|
|
||||||
cmsTagDescriptor* TagDescriptor;
|
|
||||||
cmsTagTypeSignature TypeBase;
|
|
||||||
cmsTagTypeHandler* TypeHandler;
|
|
||||||
+ cmsTagTypeHandler LocalTypeHandler;
|
|
||||||
|
|
||||||
|
|
||||||
for (i=0; i < Icc -> TagCount; i++) {
|
|
||||||
@@ -1124,9 +1125,10 @@ cmsBool SaveTags(_cmsICCPROFILE* Icc, _c
|
|
||||||
if (!_cmsWriteTypeBase(io, TypeBase))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
- TypeHandler ->ContextID = Icc ->ContextID;
|
|
||||||
- TypeHandler ->ICCVersion = Icc ->Version;
|
|
||||||
- if (!TypeHandler ->WritePtr(TypeHandler, io, Data, TagDescriptor ->ElemCount)) {
|
|
||||||
+ LocalTypeHandler = *TypeHandler;
|
|
||||||
+ LocalTypeHandler.ContextID = Icc ->ContextID;
|
|
||||||
+ LocalTypeHandler.ICCVersion = Icc ->Version;
|
|
||||||
+ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, io, Data, TagDescriptor ->ElemCount)) {
|
|
||||||
|
|
||||||
char String[5];
|
|
||||||
|
|
||||||
@@ -1302,10 +1304,11 @@ cmsBool CMSEXPORT cmsCloseProfile(cmsHP
|
|
||||||
cmsTagTypeHandler* TypeHandler = Icc ->TagTypeHandlers[i];
|
|
||||||
|
|
||||||
if (TypeHandler != NULL) {
|
|
||||||
+ cmsTagTypeHandler LocalTypeHandler = *TypeHandler;
|
|
||||||
|
|
||||||
- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameters
|
|
||||||
- TypeHandler ->ICCVersion = Icc ->Version;
|
|
||||||
- TypeHandler ->FreePtr(TypeHandler, Icc -> TagPtrs[i]);
|
|
||||||
+ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameters
|
|
||||||
+ LocalTypeHandler.ICCVersion = Icc ->Version;
|
|
||||||
+ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_cmsFree(Icc ->ContextID, Icc ->TagPtrs[i]);
|
|
||||||
@@ -1349,6 +1352,7 @@ void* CMSEXPORT cmsReadTag(cmsHPROFILE h
|
|
||||||
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
|
|
||||||
cmsIOHANDLER* io = Icc ->IOhandler;
|
|
||||||
cmsTagTypeHandler* TypeHandler;
|
|
||||||
+ cmsTagTypeHandler LocalTypeHandler;
|
|
||||||
cmsTagDescriptor* TagDescriptor;
|
|
||||||
cmsTagTypeSignature BaseType;
|
|
||||||
cmsUInt32Number Offset, TagSize;
|
|
||||||
@@ -1389,14 +1393,15 @@ void* CMSEXPORT cmsReadTag(cmsHPROFILE h
|
|
||||||
// Get type handler
|
|
||||||
TypeHandler = _cmsGetTagTypeHandler(BaseType);
|
|
||||||
if (TypeHandler == NULL) return NULL;
|
|
||||||
+ LocalTypeHandler = *TypeHandler;
|
|
||||||
|
|
||||||
|
|
||||||
// Read the tag
|
|
||||||
Icc -> TagTypeHandlers[n] = TypeHandler;
|
|
||||||
|
|
||||||
- TypeHandler ->ContextID = Icc ->ContextID;
|
|
||||||
- TypeHandler ->ICCVersion = Icc ->Version;
|
|
||||||
- Icc -> TagPtrs[n] = TypeHandler ->ReadPtr(TypeHandler, io, &ElemCount, TagSize);
|
|
||||||
+ LocalTypeHandler.ContextID = Icc ->ContextID;
|
|
||||||
+ LocalTypeHandler.ICCVersion = Icc ->Version;
|
|
||||||
+ Icc -> TagPtrs[n] = LocalTypeHandler.ReadPtr(&LocalTypeHandler, io, &ElemCount, TagSize);
|
|
||||||
|
|
||||||
// The tag type is supported, but something wrong happend and we cannot read the tag.
|
|
||||||
// let know the user about this (although it is just a warning)
|
|
||||||
@@ -1449,6 +1454,7 @@ cmsBool CMSEXPORT cmsWriteTag(cmsHPROFIL
|
|
||||||
{
|
|
||||||
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
|
|
||||||
cmsTagTypeHandler* TypeHandler = NULL;
|
|
||||||
+ cmsTagTypeHandler LocalTypeHandler;
|
|
||||||
cmsTagDescriptor* TagDescriptor = NULL;
|
|
||||||
cmsTagTypeSignature Type;
|
|
||||||
int i;
|
|
||||||
@@ -1479,9 +1485,10 @@ cmsBool CMSEXPORT cmsWriteTag(cmsHPROFIL
|
|
||||||
|
|
||||||
if (TypeHandler != NULL) {
|
|
||||||
|
|
||||||
- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameter
|
|
||||||
- TypeHandler ->ICCVersion = Icc ->Version;
|
|
||||||
- TypeHandler->FreePtr(TypeHandler, Icc -> TagPtrs[i]);
|
|
||||||
+ LocalTypeHandler = *TypeHandler;
|
|
||||||
+ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameter
|
|
||||||
+ LocalTypeHandler.ICCVersion = Icc ->Version;
|
|
||||||
+ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1558,9 +1565,10 @@ cmsBool CMSEXPORT cmsWriteTag(cmsHPROFIL
|
|
||||||
Icc ->TagSizes[i] = 0;
|
|
||||||
Icc ->TagOffsets[i] = 0;
|
|
||||||
|
|
||||||
- TypeHandler ->ContextID = Icc ->ContextID;
|
|
||||||
- TypeHandler ->ICCVersion = Icc ->Version;
|
|
||||||
- Icc ->TagPtrs[i] = TypeHandler ->DupPtr(TypeHandler, data, TagDescriptor ->ElemCount);
|
|
||||||
+ LocalTypeHandler = *TypeHandler;
|
|
||||||
+ LocalTypeHandler.ContextID = Icc ->ContextID;
|
|
||||||
+ LocalTypeHandler.ICCVersion = Icc ->Version;
|
|
||||||
+ Icc ->TagPtrs[i] = LocalTypeHandler.DupPtr(&LocalTypeHandler, data, TagDescriptor ->ElemCount);
|
|
||||||
|
|
||||||
if (Icc ->TagPtrs[i] == NULL) {
|
|
||||||
|
|
||||||
@@ -1587,6 +1595,7 @@ cmsInt32Number CMSEXPORT cmsReadRawTag(c
|
|
||||||
int i;
|
|
||||||
cmsIOHANDLER* MemIO;
|
|
||||||
cmsTagTypeHandler* TypeHandler = NULL;
|
|
||||||
+ cmsTagTypeHandler LocalTypeHandler;
|
|
||||||
cmsTagDescriptor* TagDescriptor = NULL;
|
|
||||||
cmsUInt32Number rc;
|
|
||||||
cmsUInt32Number Offset, TagSize;
|
|
||||||
@@ -1654,16 +1663,18 @@ cmsInt32Number CMSEXPORT cmsReadRawTag(c
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // FIXME: No handling for TypeHandler == NULL here?
|
|
||||||
// Serialize
|
|
||||||
- TypeHandler ->ContextID = Icc ->ContextID;
|
|
||||||
- TypeHandler ->ICCVersion = Icc ->Version;
|
|
||||||
+ LocalTypeHandler = *TypeHandler;
|
|
||||||
+ LocalTypeHandler.ContextID = Icc ->ContextID;
|
|
||||||
+ LocalTypeHandler.ICCVersion = Icc ->Version;
|
|
||||||
|
|
||||||
if (!_cmsWriteTypeBase(MemIO, TypeHandler ->Signature)) {
|
|
||||||
cmsCloseIOhandler(MemIO);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!TypeHandler ->WritePtr(TypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) {
|
|
||||||
+ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) {
|
|
||||||
cmsCloseIOhandler(MemIO);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
diff -up lcms2-2.4/src/cmsopt.c.threading-plugin lcms2-2.4/src/cmsopt.c
|
|
||||||
--- lcms2-2.4/src/cmsopt.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmsopt.c 2013-04-25 15:45:02.856816527 +0100
|
|
||||||
@@ -1609,7 +1609,7 @@ static _cmsOptimizationCollection Defaul
|
|
||||||
static _cmsOptimizationCollection* OptimizationCollection = DefaultOptimization;
|
|
||||||
|
|
||||||
// Register new ways to optimize
|
|
||||||
-cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterOptimizationPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
cmsPluginOptimization* Plugin = (cmsPluginOptimization*) Data;
|
|
||||||
_cmsOptimizationCollection* fl;
|
|
||||||
@@ -1623,7 +1623,7 @@ cmsBool _cmsRegisterOptimizationPlugin(
|
|
||||||
// Optimizer callback is required
|
|
||||||
if (Plugin ->OptimizePtr == NULL) return FALSE;
|
|
||||||
|
|
||||||
- fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(sizeof(_cmsOptimizationCollection));
|
|
||||||
+ fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(id, sizeof(_cmsOptimizationCollection));
|
|
||||||
if (fl == NULL) return FALSE;
|
|
||||||
|
|
||||||
// Copy the parameters
|
|
||||||
diff -up lcms2-2.4/src/cmspack.c.threading-plugin lcms2-2.4/src/cmspack.c
|
|
||||||
--- lcms2-2.4/src/cmspack.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmspack.c 2013-04-25 15:45:02.858816535 +0100
|
|
||||||
@@ -3137,7 +3137,7 @@ static cmsFormattersFactoryList* Factory
|
|
||||||
|
|
||||||
|
|
||||||
// Formatters management
|
|
||||||
-cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterFormattersPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
cmsPluginFormatters* Plugin = (cmsPluginFormatters*) Data;
|
|
||||||
cmsFormattersFactoryList* fl ;
|
|
||||||
@@ -3149,7 +3149,7 @@ cmsBool _cmsRegisterFormattersPlugin(cm
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(sizeof(cmsFormattersFactoryList));
|
|
||||||
+ fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(id, sizeof(cmsFormattersFactoryList));
|
|
||||||
if (fl == NULL) return FALSE;
|
|
||||||
|
|
||||||
fl ->Factory = Plugin ->FormattersFactory;
|
|
||||||
diff -up lcms2-2.4/src/cmsplugin.c.threading-plugin lcms2-2.4/src/cmsplugin.c
|
|
||||||
--- lcms2-2.4/src/cmsplugin.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmsplugin.c 2013-04-25 15:45:02.859816539 +0100
|
|
||||||
@@ -514,10 +514,10 @@ cmsBool CMSEXPORT _cmsIOPrintf(cmsIOHAND
|
|
||||||
static _cmsSubAllocator* PluginPool = NULL;
|
|
||||||
|
|
||||||
// Specialized malloc for plug-ins, that is freed upon exit.
|
|
||||||
-void* _cmsPluginMalloc(cmsUInt32Number size)
|
|
||||||
+void* _cmsPluginMalloc(cmsContext id, cmsUInt32Number size)
|
|
||||||
{
|
|
||||||
if (PluginPool == NULL)
|
|
||||||
- PluginPool = _cmsCreateSubAlloc(0, 4*1024);
|
|
||||||
+ PluginPool = _cmsCreateSubAlloc(id, 4*1024);
|
|
||||||
|
|
||||||
return _cmsSubAlloc(PluginPool, size);
|
|
||||||
}
|
|
||||||
@@ -526,6 +526,11 @@ void* _cmsPluginMalloc(cmsUInt32Number s
|
|
||||||
// Main plug-in dispatcher
|
|
||||||
cmsBool CMSEXPORT cmsPlugin(void* Plug_in)
|
|
||||||
{
|
|
||||||
+ return cmsPluginTHR(NULL, Plug_in);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+cmsBool CMSEXPORT cmsPluginTHR(cmsContext id, void* Plug_in)
|
|
||||||
+{
|
|
||||||
cmsPluginBase* Plugin;
|
|
||||||
|
|
||||||
for (Plugin = (cmsPluginBase*) Plug_in;
|
|
||||||
@@ -554,35 +559,35 @@ cmsBool CMSEXPORT cmsPlugin(void* Plug_i
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginTagTypeSig:
|
|
||||||
- if (!_cmsRegisterTagTypePlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterTagTypePlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginTagSig:
|
|
||||||
- if (!_cmsRegisterTagPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterTagPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginFormattersSig:
|
|
||||||
- if (!_cmsRegisterFormattersPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterFormattersPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginRenderingIntentSig:
|
|
||||||
- if (!_cmsRegisterRenderingIntentPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterRenderingIntentPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginParametricCurveSig:
|
|
||||||
- if (!_cmsRegisterParametricCurvesPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterParametricCurvesPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginMultiProcessElementSig:
|
|
||||||
- if (!_cmsRegisterMultiProcessElementPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterMultiProcessElementPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginOptimizationSig:
|
|
||||||
- if (!_cmsRegisterOptimizationPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterOptimizationPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case cmsPluginTransformSig:
|
|
||||||
- if (!_cmsRegisterTransformPlugin(Plugin)) return FALSE;
|
|
||||||
+ if (!_cmsRegisterTransformPlugin(id, Plugin)) return FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
@@ -601,14 +606,14 @@ void CMSEXPORT cmsUnregisterPlugins(void
|
|
||||||
{
|
|
||||||
_cmsRegisterMemHandlerPlugin(NULL);
|
|
||||||
_cmsRegisterInterpPlugin(NULL);
|
|
||||||
- _cmsRegisterTagTypePlugin(NULL);
|
|
||||||
- _cmsRegisterTagPlugin(NULL);
|
|
||||||
- _cmsRegisterFormattersPlugin(NULL);
|
|
||||||
- _cmsRegisterRenderingIntentPlugin(NULL);
|
|
||||||
- _cmsRegisterParametricCurvesPlugin(NULL);
|
|
||||||
- _cmsRegisterMultiProcessElementPlugin(NULL);
|
|
||||||
- _cmsRegisterOptimizationPlugin(NULL);
|
|
||||||
- _cmsRegisterTransformPlugin(NULL);
|
|
||||||
+ _cmsRegisterTagTypePlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterTagPlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterFormattersPlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterRenderingIntentPlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterParametricCurvesPlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterMultiProcessElementPlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterOptimizationPlugin(NULL, NULL);
|
|
||||||
+ _cmsRegisterTransformPlugin(NULL, NULL);
|
|
||||||
|
|
||||||
if (PluginPool != NULL)
|
|
||||||
_cmsSubAllocDestroy(PluginPool);
|
|
||||||
diff -up lcms2-2.4/src/cmssamp.c.threading-plugin lcms2-2.4/src/cmssamp.c
|
|
||||||
--- lcms2-2.4/src/cmssamp.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmssamp.c 2013-04-25 15:45:22.998902804 +0100
|
|
||||||
@@ -38,13 +38,13 @@
|
|
||||||
static
|
|
||||||
cmsHTRANSFORM CreateRoundtripXForm(cmsHPROFILE hProfile, cmsUInt32Number nIntent)
|
|
||||||
{
|
|
||||||
- cmsHPROFILE hLab = cmsCreateLab4Profile(NULL);
|
|
||||||
+ cmsContext ContextID = cmsGetProfileContextID(hProfile);
|
|
||||||
+ cmsHPROFILE hLab = cmsCreateLab4ProfileTHR(ContextID, NULL);
|
|
||||||
cmsHTRANSFORM xform;
|
|
||||||
cmsBool BPC[4] = { FALSE, FALSE, FALSE, FALSE };
|
|
||||||
cmsFloat64Number States[4] = { 1.0, 1.0, 1.0, 1.0 };
|
|
||||||
cmsHPROFILE hProfiles[4];
|
|
||||||
cmsUInt32Number Intents[4];
|
|
||||||
- cmsContext ContextID = cmsGetProfileContextID(hProfile);
|
|
||||||
|
|
||||||
hProfiles[0] = hLab; hProfiles[1] = hProfile; hProfiles[2] = hProfile; hProfiles[3] = hLab;
|
|
||||||
Intents[0] = INTENT_RELATIVE_COLORIMETRIC; Intents[1] = nIntent; Intents[2] = INTENT_RELATIVE_COLORIMETRIC; Intents[3] = INTENT_RELATIVE_COLORIMETRIC;
|
|
||||||
diff -up lcms2-2.4/src/cmstypes.c.threading-plugin lcms2-2.4/src/cmstypes.c
|
|
||||||
--- lcms2-2.4/src/cmstypes.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmstypes.c 2013-04-25 15:45:02.861816548 +0100
|
|
||||||
@@ -62,7 +62,7 @@ typedef struct _cmsTagTypeLinkedList_st
|
|
||||||
|
|
||||||
// Register a new type handler. This routine is shared between normal types and MPE
|
|
||||||
static
|
|
||||||
-cmsBool RegisterTypesPlugin(cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount)
|
|
||||||
+cmsBool RegisterTypesPlugin(cmsContext id, cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount)
|
|
||||||
{
|
|
||||||
cmsPluginTagType* Plugin = (cmsPluginTagType*) Data;
|
|
||||||
_cmsTagTypeLinkedList *pt, *Anterior = NULL;
|
|
||||||
@@ -89,7 +89,7 @@ cmsBool RegisterTypesPlugin(cmsPluginBas
|
|
||||||
}
|
|
||||||
|
|
||||||
// Registering happens in plug-in memory pool
|
|
||||||
- pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagTypeLinkedList));
|
|
||||||
+ pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagTypeLinkedList));
|
|
||||||
if (pt == NULL) return FALSE;
|
|
||||||
|
|
||||||
pt ->Handler = Plugin ->Handler;
|
|
||||||
@@ -5248,14 +5248,14 @@ static _cmsTagTypeLinkedList SupportedTa
|
|
||||||
#define DEFAULT_TAG_TYPE_COUNT (sizeof(SupportedTagTypes) / sizeof(_cmsTagTypeLinkedList))
|
|
||||||
|
|
||||||
// Both kind of plug-ins share same structure
|
|
||||||
-cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterTagTypePlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
- return RegisterTypesPlugin(Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT);
|
|
||||||
+ return RegisterTypesPlugin(id, Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT);
|
|
||||||
}
|
|
||||||
|
|
||||||
-cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
- return RegisterTypesPlugin(Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT);
|
|
||||||
+ return RegisterTypesPlugin(id, Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5377,7 +5377,7 @@ static _cmsTagLinkedList SupportedTags[]
|
|
||||||
|
|
||||||
#define DEFAULT_TAG_COUNT (sizeof(SupportedTags) / sizeof(_cmsTagLinkedList))
|
|
||||||
|
|
||||||
-cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterTagPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
cmsPluginTag* Plugin = (cmsPluginTag*) Data;
|
|
||||||
_cmsTagLinkedList *pt, *Anterior;
|
|
||||||
@@ -5401,7 +5401,7 @@ cmsBool _cmsRegisterTagPlugin(cmsPlugin
|
|
||||||
pt = pt ->Next;
|
|
||||||
}
|
|
||||||
|
|
||||||
- pt = (_cmsTagLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagLinkedList));
|
|
||||||
+ pt = (_cmsTagLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagLinkedList));
|
|
||||||
if (pt == NULL) return FALSE;
|
|
||||||
|
|
||||||
pt ->Signature = Plugin ->Signature;
|
|
||||||
diff -up lcms2-2.4/src/cmsxform.c.threading-plugin lcms2-2.4/src/cmsxform.c
|
|
||||||
--- lcms2-2.4/src/cmsxform.c.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/cmsxform.c 2013-04-25 15:45:02.862816552 +0100
|
|
||||||
@@ -367,7 +367,7 @@ typedef struct _cmsTransformCollection_s
|
|
||||||
static _cmsTransformCollection* TransformCollection = NULL;
|
|
||||||
|
|
||||||
// Register new ways to transform
|
|
||||||
-cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Data)
|
|
||||||
+cmsBool _cmsRegisterTransformPlugin(cmsContext id, cmsPluginBase* Data)
|
|
||||||
{
|
|
||||||
cmsPluginTransform* Plugin = (cmsPluginTransform*) Data;
|
|
||||||
_cmsTransformCollection* fl;
|
|
||||||
@@ -383,7 +383,7 @@ cmsBool _cmsRegisterTransformPlugin(cms
|
|
||||||
if (Plugin ->Factory == NULL) return FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
- fl = (_cmsTransformCollection*) _cmsPluginMalloc(sizeof(_cmsTransformCollection));
|
|
||||||
+ fl = (_cmsTransformCollection*) _cmsPluginMalloc(id, sizeof(_cmsTransformCollection));
|
|
||||||
if (fl == NULL) return FALSE;
|
|
||||||
|
|
||||||
// Copy the parameters
|
|
||||||
diff -up lcms2-2.4/src/lcms2_internal.h.threading-plugin lcms2-2.4/src/lcms2_internal.h
|
|
||||||
--- lcms2-2.4/src/lcms2_internal.h.threading-plugin 2012-09-10 17:01:51.000000000 +0100
|
|
||||||
+++ lcms2-2.4/src/lcms2_internal.h 2013-04-25 15:45:02.862816552 +0100
|
|
||||||
@@ -167,7 +167,7 @@ cmsINLINE cmsUInt16Number _cmsQuickSatur
|
|
||||||
// Plug-In registering ---------------------------------------------------------------
|
|
||||||
|
|
||||||
// Specialized function for plug-in memory management. No pairing free() since whole pool is freed at once.
|
|
||||||
-void* _cmsPluginMalloc(cmsUInt32Number size);
|
|
||||||
+void* _cmsPluginMalloc(cmsContext ContextID, cmsUInt32Number size);
|
|
||||||
|
|
||||||
// Memory management
|
|
||||||
cmsBool _cmsRegisterMemHandlerPlugin(cmsPluginBase* Plugin);
|
|
||||||
@@ -176,28 +176,28 @@ cmsBool _cmsRegisterMemHandlerPlugin(c
|
|
||||||
cmsBool _cmsRegisterInterpPlugin(cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Parametric curves
|
|
||||||
-cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Formatters management
|
|
||||||
-cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterFormattersPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Tag type management
|
|
||||||
-cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterTagTypePlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Tag management
|
|
||||||
-cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterTagPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Intent management
|
|
||||||
-cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Multi Process elements
|
|
||||||
-cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Optimization
|
|
||||||
-cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterOptimizationPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// Transform
|
|
||||||
-cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Plugin);
|
|
||||||
+cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
21
lcms2.spec
21
lcms2.spec
@ -1,11 +1,10 @@
|
|||||||
Name: lcms2
|
Name: lcms2
|
||||||
Version: 2.4
|
Version: 2.5
|
||||||
Release: 6%{?dist}
|
Release: 0.1%{?dist}
|
||||||
Summary: Color Management Engine
|
Summary: Color Management Engine
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.littlecms.com/
|
URL: http://www.littlecms.com/
|
||||||
Source0: http://www.littlecms.com/lcms2-2.4.tar.gz
|
Source0: http://www.littlecms.com/lcms2-2.5rc1.tar.gz
|
||||||
Patch1: lcms2-threading-plugin.patch
|
|
||||||
|
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libtiff-devel
|
BuildRequires: libtiff-devel
|
||||||
@ -34,8 +33,7 @@ Provides: littlecms-devel = %{version}-%{release}
|
|||||||
Development files for LittleCMS.
|
Development files for LittleCMS.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n lcms2-2.5rc1
|
||||||
%patch1 -p1 -b .threading-plugin
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static --program-suffix=2
|
%configure --disable-static --program-suffix=2
|
||||||
@ -54,9 +52,9 @@ install -D -m 644 include/lcms2.h $RPM_BUILD_ROOT/usr/include/lcms2.h
|
|||||||
install -D -m 644 include/lcms2_plugin.h $RPM_BUILD_ROOT/usr/include/lcms2_plugin.h
|
install -D -m 644 include/lcms2_plugin.h $RPM_BUILD_ROOT/usr/include/lcms2_plugin.h
|
||||||
|
|
||||||
# install docs as this is all we've got
|
# install docs as this is all we've got
|
||||||
install -D -m 644 doc/LittleCMS2.4\ tutorial.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.4/tutorial.pdf
|
install -D -m 644 doc/LittleCMS2.?\ tutorial.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.5/tutorial.pdf
|
||||||
install -D -m 644 doc/LittleCMS2.?\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.4/api.pdf
|
install -D -m 644 doc/LittleCMS2.?\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.5/api.pdf
|
||||||
install -D -m 644 doc/LittleCMS2.?\ Plugin\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.4/plugin-api.pdf
|
install -D -m 644 doc/LittleCMS2.?\ Plugin\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.5/plugin-api.pdf
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
@ -77,12 +75,15 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_datadir}/doc/lcms2-devel-2.4/*.pdf
|
%{_datadir}/doc/lcms2-devel-2.5/*.pdf
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 30 2013 Richard Hughes <richard@hughsie.com> 2.5-0.1
|
||||||
|
- Update to new release candidate version.
|
||||||
|
|
||||||
* Thu Apr 25 2013 Tim Waugh <twaugh@redhat.com> - 2.4-6
|
* Thu Apr 25 2013 Tim Waugh <twaugh@redhat.com> - 2.4-6
|
||||||
- Applied upstream fixes for threading (bug #951984).
|
- Applied upstream fixes for threading (bug #951984).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user