diff options
author | Nicolas Silva <nsilva@mozilla.com> | 2018-06-19 15:32:29 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-30 19:04:10 +0200 |
commit | 3858dd6de2f4d510b42ca8675235469b8b78ed02 (patch) | |
tree | 32b83bc480cf3d65837dd0d2c2f0d6ea08ccbc21 /gfx/thebes/gfxPlatform.cpp | |
parent | bb89f847383c982f25497a31f94129bf65e50868 (diff) | |
download | UXP-3858dd6de2f4d510b42ca8675235469b8b78ed02.tar UXP-3858dd6de2f4d510b42ca8675235469b8b78ed02.tar.gz UXP-3858dd6de2f4d510b42ca8675235469b8b78ed02.tar.lz UXP-3858dd6de2f4d510b42ca8675235469b8b78ed02.tar.xz UXP-3858dd6de2f4d510b42ca8675235469b8b78ed02.zip |
Bug 1464039 - Only reject qcms transform with invalid grid size if the transform function uses the grid size. r=Bas a=jcristau
Diffstat (limited to 'gfx/thebes/gfxPlatform.cpp')
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 684117788..171d1bec9 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -156,6 +156,7 @@ static Mutex* gGfxPlatformPrefsLock = nullptr; static qcms_profile *gCMSOutputProfile = nullptr; static qcms_profile *gCMSsRGBProfile = nullptr; +static bool gCMSRGBTransformFailed = false; static qcms_transform *gCMSRGBTransform = nullptr; static qcms_transform *gCMSInverseRGBTransform = nullptr; static qcms_transform *gCMSRGBATransform = nullptr; @@ -1856,7 +1857,7 @@ gfxPlatform::GetCMSsRGBProfile() qcms_transform * gfxPlatform::GetCMSRGBTransform() { - if (!gCMSRGBTransform) { + if (!gCMSRGBTransform && !gCMSRGBTransformFailed) { qcms_profile *inProfile, *outProfile; outProfile = GetCMSOutputProfile(); inProfile = GetCMSsRGBProfile(); @@ -1867,6 +1868,9 @@ gfxPlatform::GetCMSRGBTransform() gCMSRGBTransform = qcms_transform_create(inProfile, QCMS_DATA_RGB_8, outProfile, QCMS_DATA_RGB_8, QCMS_INTENT_PERCEPTUAL); + if (!gCMSRGBTransform) { + gCMSRGBTransformFailed = true; + } } return gCMSRGBTransform; |