Lines Matching defs:color
201 * This test checks that eraseColor premultiplies the color correctly.
204 SkColor color = 0x80FF0080;
205 test_erasecolor_premul(r, kAlpha_8_SkColorType, color, 0x80000000);
206 test_erasecolor_premul(r, kRGB_565_SkColorType, color, 0xFF840042);
207 test_erasecolor_premul(r, kARGB_4444_SkColorType, color, 0x88FF0080);
208 test_erasecolor_premul(r, kRGBA_8888_SkColorType, color, color);
209 test_erasecolor_premul(r, kBGRA_8888_SkColorType, color, color);
242 for (SkColor color : {color1, color2}) {
243 pm.erase(color);
244 if (SkColorGetA(color) != 0) {
245 REPORTER_ASSERT(r, color == pm.getColor(0, 0));
257 // Use a color spin from SRGB.
260 // RED will be converted into the spun color space.
262 // getColor doesn't take the color space into account, so the returned color
263 // is different due to the color spin.
275 // At the time of writing, SkBitmap::erase() works when the color is zero for all formats,
276 // but some formats failed when the color is non-zero!