summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'gfx')
-rw-r--r--gfx/qcms/chain.c4
-rw-r--r--gfx/thebes/gfxPlatform.cpp6
2 files changed, 8 insertions, 2 deletions
diff --git a/gfx/qcms/chain.c b/gfx/qcms/chain.c
index 2b0e707c4..dbae18378 100644
--- a/gfx/qcms/chain.c
+++ b/gfx/qcms/chain.c
@@ -972,7 +972,9 @@ static float* qcms_modular_transform_data(struct qcms_modular_transform *transfo
assert(0 && "Unsupported transform module");
return NULL;
}
- if (transform->grid_size <= 0) {
+ if (transform->grid_size <= 0 &&
+ (transform_fn == qcms_transform_module_clut ||
+ transform_fn == qcms_transform_module_clut_only)) {
assert(0 && "Invalid transform");
return NULL;
}
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;