diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2019-03-02 15:04:33 -0800 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2019-03-02 15:04:33 -0800 |
commit | d5bc9bd2a548e6c12dd8224b6d18615d050a5731 (patch) | |
tree | e35bb153ddcaab6898070a0265a05df980e393fa /lcms2mt | |
parent | 79ce761f39aac21c270d8fb19142f5f8146440d2 (diff) | |
download | ghostpdl-d5bc9bd2a548e6c12dd8224b6d18615d050a5731.tar.gz |
Only use plug-in clone if transform is not identity
lcms will if it finds the table is essentially the identity set
the transform to a copy operation. If this is the case, then
just use that operation as it will be as fast as things can get.
Diffstat (limited to 'lcms2mt')
-rw-r--r-- | lcms2mt/src/cmsxform.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lcms2mt/src/cmsxform.c b/lcms2mt/src/cmsxform.c index eff144819..56f584961 100644 --- a/lcms2mt/src/cmsxform.c +++ b/lcms2mt/src/cmsxform.c @@ -1622,8 +1622,9 @@ cmsHTRANSFORM cmsCloneTransformChangingFormats(cmsContext ContextID, xform ->FromInput = FromInput; xform ->ToOutput = ToOutput; - /* Transformation plug-in support needed here */ - if (oldXform->core->Lut != NULL) { + /* Transformation plug-in support needed here but only if lcms has determined + that this lut is not the identity transform */ + if (oldXform->core->Lut != NULL && _cmsLutIsIdentity(oldXform->core->Lut) == FALSE) { for (Plugin = ctx->TransformCollection; Plugin != NULL; Plugin = Plugin->Next) { core = xform->core; if (Plugin->Factory(ContextID, &xform->xform, &core->UserData, |