Bug 453726 - thebes does an unnecessary float->byte->float conversion on the alpha channel when color management is turned on. r=vlad

This commit is contained in:
Bobby Holley 2008-09-08 14:41:26 -07:00
parent aabaf515af
commit b76029e429
2 changed files with 6 additions and 2 deletions

View File

@ -637,7 +637,9 @@ gfxContext::SetColor(const gfxRGBA& c)
1);
gfxRGBA cms(packed, gfxRGBA::PACKED_ARGB);
#endif
cairo_set_source_rgba(mCairo, cms.r, cms.g, cms.b, cms.a);
// Use the original alpha to avoid unnecessary float->byte->float
// conversion errors
cairo_set_source_rgba(mCairo, cms.r, cms.g, cms.b, c.a);
return;
}
}

View File

@ -103,8 +103,10 @@ gfxPattern::AddColorStop(gfxFloat offset, const gfxRGBA& c)
1);
gfxRGBA cms(packed, gfxRGBA::PACKED_ARGB);
#endif
// Use the original alpha to avoid unnecessary float->byte->float
// conversion errors
cairo_pattern_add_color_stop_rgba(mPattern, offset,
cms.r, cms.g, cms.b, cms.a);
cms.r, cms.g, cms.b, c.a);
return;
}
}