Avoid drawing BW clipped color glyphs many times.

Prior to this change if a color glyph is drawn through the raster device
with an aliased clip the glyph is drawn once for each rectangular region
in the aliased clip. In addition, even when the glyph was not a color
glyph in this situation, the mask was checked for being a color glyph
once for each rectangular region of the aliased clip. This change hoists
the test for the color format out of the loop to ensure that the mask
format is checked once and the mask is drawn once.

This issue was discovered by rotating the coloremoji_blendmodes gm.

Change-Id: I18b6b546356780e0b00948fff7b65783219f5c92
Reviewed-on: https://skia-review.googlesource.com/125868
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
1 file changed