mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 839621 - qcms_transform_create can return null, so indirect callers need to be ready for it as well. r=jmuizelaar
This commit is contained in:
parent
48a6cefff5
commit
8dbfb840d9
@ -1269,7 +1269,9 @@ gfxContext::SetColor(const gfxRGBA& c)
|
||||
if (gfxPlatform::GetCMSMode() == eCMSMode_All) {
|
||||
|
||||
gfxRGBA cms;
|
||||
gfxPlatform::TransformPixel(c, cms, gfxPlatform::GetCMSRGBTransform());
|
||||
qcms_transform *transform = gfxPlatform::GetCMSRGBTransform();
|
||||
if (transform)
|
||||
gfxPlatform::TransformPixel(c, cms, transform);
|
||||
|
||||
// Use the original alpha to avoid unnecessary float->byte->float
|
||||
// conversion errors
|
||||
@ -1285,7 +1287,9 @@ gfxContext::SetColor(const gfxRGBA& c)
|
||||
if (gfxPlatform::GetCMSMode() == eCMSMode_All) {
|
||||
|
||||
gfxRGBA cms;
|
||||
gfxPlatform::TransformPixel(c, cms, gfxPlatform::GetCMSRGBTransform());
|
||||
qcms_transform *transform = gfxPlatform::GetCMSRGBTransform();
|
||||
if (transform)
|
||||
gfxPlatform::TransformPixel(c, cms, transform);
|
||||
|
||||
// Use the original alpha to avoid unnecessary float->byte->float
|
||||
// conversion errors
|
||||
|
@ -80,7 +80,9 @@ gfxPattern::AddColorStop(gfxFloat offset, const gfxRGBA& c)
|
||||
mStops = NULL;
|
||||
if (gfxPlatform::GetCMSMode() == eCMSMode_All) {
|
||||
gfxRGBA cms;
|
||||
gfxPlatform::TransformPixel(c, cms, gfxPlatform::GetCMSRGBTransform());
|
||||
qcms_transform *transform = gfxPlatform::GetCMSRGBTransform();
|
||||
if (transform)
|
||||
gfxPlatform::TransformPixel(c, cms, transform);
|
||||
|
||||
// Use the original alpha to avoid unnecessary float->byte->float
|
||||
// conversion errors
|
||||
@ -431,4 +433,4 @@ gfxPattern::AdjustTransformForPattern(Matrix &aPatternTransform,
|
||||
// device space to current user space.
|
||||
aPatternTransform = aPatternTransform * *aOriginalTransform * mat;
|
||||
aPatternTransform.NudgeToIntegers();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user