some code movements for #4834
This commit is contained in:
parent
095cb010e5
commit
b641fdaba7
@ -1410,7 +1410,39 @@ void ImProcCoordinator::process()
|
|||||||
paramsUpdateMutex.lock();
|
paramsUpdateMutex.lock();
|
||||||
|
|
||||||
while (changeSinceLast) {
|
while (changeSinceLast) {
|
||||||
const bool panningRelatedChange = params.isPanningRelatedChange(nextParams);
|
const bool panningRelatedChange =
|
||||||
|
params.toneCurve != nextParams.toneCurve
|
||||||
|
|| params.labCurve != nextParams.labCurve
|
||||||
|
|| params.localContrast != nextParams.localContrast
|
||||||
|
|| params.rgbCurves != nextParams.rgbCurves
|
||||||
|
|| params.colorToning != nextParams.colorToning
|
||||||
|
|| params.vibrance != nextParams.vibrance
|
||||||
|
|| params.wb != nextParams.wb
|
||||||
|
|| params.colorappearance != nextParams.colorappearance
|
||||||
|
|| params.epd != nextParams.epd
|
||||||
|
|| params.fattal != nextParams.fattal
|
||||||
|
|| params.sh != nextParams.sh
|
||||||
|
|| params.crop != nextParams.crop
|
||||||
|
|| params.coarse != nextParams.coarse
|
||||||
|
|| params.commonTrans != nextParams.commonTrans
|
||||||
|
|| params.rotate != nextParams.rotate
|
||||||
|
|| params.distortion != nextParams.distortion
|
||||||
|
|| params.lensProf != nextParams.lensProf
|
||||||
|
|| params.perspective != nextParams.perspective
|
||||||
|
|| params.gradient != nextParams.gradient
|
||||||
|
|| params.pcvignette != nextParams.pcvignette
|
||||||
|
|| params.cacorrection != nextParams.cacorrection
|
||||||
|
|| params.vignetting != nextParams.vignetting
|
||||||
|
|| params.chmixer != nextParams.chmixer
|
||||||
|
|| params.blackwhite != nextParams.blackwhite
|
||||||
|
|| params.icm != nextParams.icm
|
||||||
|
|| params.hsvequalizer != nextParams.hsvequalizer
|
||||||
|
|| params.filmSimulation != nextParams.filmSimulation
|
||||||
|
|| params.softlight != nextParams.softlight
|
||||||
|
|| params.raw != nextParams.raw
|
||||||
|
|| params.retinex != nextParams.retinex
|
||||||
|
|| params.dirpyrequalizer != nextParams.dirpyrequalizer;
|
||||||
|
|
||||||
params = nextParams;
|
params = nextParams;
|
||||||
int change = changeSinceLast;
|
int change = changeSinceLast;
|
||||||
changeSinceLast = 0;
|
changeSinceLast = 0;
|
||||||
|
@ -5048,73 +5048,6 @@ int ProcParams::write(const Glib::ustring& fname, const Glib::ustring& content)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProcParams::isThumbRelatedChange(const ProcParams &newParams) const
|
|
||||||
{
|
|
||||||
return toneCurve != newParams.toneCurve
|
|
||||||
|| labCurve != newParams.labCurve
|
|
||||||
|| localContrast != newParams.localContrast
|
|
||||||
|| rgbCurves != newParams.rgbCurves
|
|
||||||
|| colorToning != newParams.colorToning
|
|
||||||
|| vibrance != newParams.vibrance
|
|
||||||
|| wb != newParams.wb
|
|
||||||
|| colorappearance != newParams.colorappearance
|
|
||||||
|| epd != newParams.epd
|
|
||||||
|| fattal != newParams.fattal
|
|
||||||
|| sh != newParams.sh
|
|
||||||
|| crop != newParams.crop
|
|
||||||
|| coarse != newParams.coarse
|
|
||||||
|| commonTrans != newParams.commonTrans
|
|
||||||
|| rotate != newParams.rotate
|
|
||||||
|| distortion != newParams.distortion
|
|
||||||
|| lensProf != newParams.lensProf
|
|
||||||
|| perspective != newParams.perspective
|
|
||||||
|| gradient != newParams.gradient
|
|
||||||
|| pcvignette != newParams.pcvignette
|
|
||||||
|| cacorrection != newParams.cacorrection
|
|
||||||
|| vignetting != newParams.vignetting
|
|
||||||
|| chmixer != newParams.chmixer
|
|
||||||
|| blackwhite != newParams.blackwhite
|
|
||||||
|| icm != newParams.icm
|
|
||||||
|| hsvequalizer != newParams.hsvequalizer
|
|
||||||
|| filmSimulation != newParams.filmSimulation
|
|
||||||
|| softlight != newParams.softlight;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ProcParams::isPanningRelatedChange(const ProcParams &newParams) const
|
|
||||||
{
|
|
||||||
return toneCurve != newParams.toneCurve
|
|
||||||
|| labCurve != newParams.labCurve
|
|
||||||
|| localContrast != newParams.localContrast
|
|
||||||
|| rgbCurves != newParams.rgbCurves
|
|
||||||
|| colorToning != newParams.colorToning
|
|
||||||
|| vibrance != newParams.vibrance
|
|
||||||
|| wb != newParams.wb
|
|
||||||
|| colorappearance != newParams.colorappearance
|
|
||||||
|| epd != newParams.epd
|
|
||||||
|| fattal != newParams.fattal
|
|
||||||
|| sh != newParams.sh
|
|
||||||
|| crop != newParams.crop
|
|
||||||
|| coarse != newParams.coarse
|
|
||||||
|| commonTrans != newParams.commonTrans
|
|
||||||
|| rotate != newParams.rotate
|
|
||||||
|| distortion != newParams.distortion
|
|
||||||
|| lensProf != newParams.lensProf
|
|
||||||
|| perspective != newParams.perspective
|
|
||||||
|| gradient != newParams.gradient
|
|
||||||
|| pcvignette != newParams.pcvignette
|
|
||||||
|| cacorrection != newParams.cacorrection
|
|
||||||
|| vignetting != newParams.vignetting
|
|
||||||
|| chmixer != newParams.chmixer
|
|
||||||
|| blackwhite != newParams.blackwhite
|
|
||||||
|| icm != newParams.icm
|
|
||||||
|| hsvequalizer != newParams.hsvequalizer
|
|
||||||
|| filmSimulation != newParams.filmSimulation
|
|
||||||
|| softlight != newParams.softlight
|
|
||||||
|| raw != newParams.raw
|
|
||||||
|| retinex != newParams.retinex
|
|
||||||
|| dirpyrequalizer != newParams.dirpyrequalizer;
|
|
||||||
}
|
|
||||||
|
|
||||||
PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue)
|
PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue)
|
||||||
{
|
{
|
||||||
if (createInstance) {
|
if (createInstance) {
|
||||||
|
@ -1488,9 +1488,6 @@ public:
|
|||||||
bool operator ==(const ProcParams& other) const;
|
bool operator ==(const ProcParams& other) const;
|
||||||
bool operator !=(const ProcParams& other) const;
|
bool operator !=(const ProcParams& other) const;
|
||||||
|
|
||||||
bool isThumbRelatedChange(const ProcParams &newParams) const;
|
|
||||||
bool isPanningRelatedChange(const ProcParams &newParams) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Write the ProcParams's text in the file of the given name.
|
/** Write the ProcParams's text in the file of the given name.
|
||||||
* @param fname the name of the file
|
* @param fname the name of the file
|
||||||
|
@ -419,7 +419,36 @@ bool Thumbnail::hasProcParams () const
|
|||||||
|
|
||||||
void Thumbnail::setProcParams (const ProcParams& pp, ParamsEdited* pe, int whoChangedIt, bool updateCacheNow)
|
void Thumbnail::setProcParams (const ProcParams& pp, ParamsEdited* pe, int whoChangedIt, bool updateCacheNow)
|
||||||
{
|
{
|
||||||
const bool needsReprocessing = pparams.isThumbRelatedChange(pp);
|
const bool needsReprocessing =
|
||||||
|
pparams.toneCurve != pp.toneCurve
|
||||||
|
|| pparams.labCurve != pp.labCurve
|
||||||
|
|| pparams.localContrast != pp.localContrast
|
||||||
|
|| pparams.rgbCurves != pp.rgbCurves
|
||||||
|
|| pparams.colorToning != pp.colorToning
|
||||||
|
|| pparams.vibrance != pp.vibrance
|
||||||
|
|| pparams.wb != pp.wb
|
||||||
|
|| pparams.colorappearance != pp.colorappearance
|
||||||
|
|| pparams.epd != pp.epd
|
||||||
|
|| pparams.fattal != pp.fattal
|
||||||
|
|| pparams.sh != pp.sh
|
||||||
|
|| pparams.crop != pp.crop
|
||||||
|
|| pparams.coarse != pp.coarse
|
||||||
|
|| pparams.commonTrans != pp.commonTrans
|
||||||
|
|| pparams.rotate != pp.rotate
|
||||||
|
|| pparams.distortion != pp.distortion
|
||||||
|
|| pparams.lensProf != pp.lensProf
|
||||||
|
|| pparams.perspective != pp.perspective
|
||||||
|
|| pparams.gradient != pp.gradient
|
||||||
|
|| pparams.pcvignette != pp.pcvignette
|
||||||
|
|| pparams.cacorrection != pp.cacorrection
|
||||||
|
|| pparams.vignetting != pp.vignetting
|
||||||
|
|| pparams.chmixer != pp.chmixer
|
||||||
|
|| pparams.blackwhite != pp.blackwhite
|
||||||
|
|| pparams.icm != pp.icm
|
||||||
|
|| pparams.hsvequalizer != pp.hsvequalizer
|
||||||
|
|| pparams.filmSimulation != pp.filmSimulation
|
||||||
|
|| pparams.softlight != pp.softlight;
|
||||||
|
|
||||||
{
|
{
|
||||||
MyMutex::MyLock lock(mutex);
|
MyMutex::MyLock lock(mutex);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user