Chromium Code Reviews| Index: ui/gfx/skbitmap_operations_unittest.cc |
| diff --git a/ui/gfx/skbitmap_operations_unittest.cc b/ui/gfx/skbitmap_operations_unittest.cc |
| index f5c89f86fde3c8ee0a86b334490c3158002392d0..b263a6b559cca0790393d0c3ea75900a20b9eebc 100644 |
| --- a/ui/gfx/skbitmap_operations_unittest.cc |
| +++ b/ui/gfx/skbitmap_operations_unittest.cc |
| @@ -273,7 +273,7 @@ TEST(SkBitmapOperationsTest, CreateHSLShiftedBitmapHueOnly) { |
| for (int y = 0, i = 0; y < src_h; y++) { |
| for (int x = 0; x < src_w; x++) { |
| - EXPECT_TRUE(ColorsClose(*shifted.getAddr32(x, y), |
| + EXPECT_TRUE(ColorsClose(shifted.getColor(x, y), |
| SkColorSetARGB(255, i % 255, 0, 0))); |
| i++; |
| } |
| @@ -477,10 +477,11 @@ TEST(SkBitmapOperationsTest, UnPreMultiply) { |
| input.setConfig(SkBitmap::kARGB_8888_Config, 2, 2); |
| input.allocPixels(); |
| - *input.getAddr32(0, 0) = 0x80000000; |
| - *input.getAddr32(1, 0) = 0x80808080; |
| - *input.getAddr32(0, 1) = 0xFF00CC88; |
| - *input.getAddr32(1, 1) = 0x0000CC88; |
| + // Set PMColors into the bitmap |
|
reed1
2012/08/06 12:42:43
The last value is not a valid PMColor, for its alp
yongsheng
2012/08/07 01:18:40
yes, so use SkPackARGB32NoCheck here.
I'm not the
Nico
2012/08/07 23:39:40
Right, I think it's just there to check that bound
yongsheng
2012/08/08 00:20:35
great, thank you, Nico.
|
| + *input.getAddr32(0, 0) = SkPackARGB32NoCheck(0x80, 0x00, 0x00, 0x00); |
| + *input.getAddr32(1, 0) = SkPackARGB32NoCheck(0x80, 0x80, 0x80, 0x80); |
| + *input.getAddr32(0, 1) = SkPackARGB32NoCheck(0xFF, 0x00, 0xCC, 0x88); |
| + *input.getAddr32(1, 1) = SkPackARGB32NoCheck(0x00, 0x00, 0xCC, 0x88); |
| SkBitmap result = SkBitmapOperations::UnPreMultiply(input); |
| EXPECT_EQ(2, result.width()); |