This makes it easier for reusing code for calculating ComplexColor.
Note that this patch also includes two fixes to the logic:
1. Fix the condition on when DiluteColor should be called instead of
AddWeightedColors. See discussion in bug 1216843 comment 199 to 204.
2. Simplify DiluteColor to not using premultiplied color. See discussion
in bug 1216843 comment 205 to 206.
MozReview-Commit-ID: DOXMpDkwhAK
--HG--
extra : rebase_source : 2e914c26fac4613c25d5f1381693617a9bbbe412