Lines Matching refs:bitmap
76 // Tests bitmap serialization.
77 TEST(IPCMessageTest, Bitmap) {
78 SkBitmap bitmap;
80 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 5);
81 bitmap.allocPixels();
82 memset(bitmap.getPixels(), 'A', bitmap.getSize());
85 IPC::ParamTraits<SkBitmap>::Write(&msg, bitmap);
91 EXPECT_EQ(bitmap.config(), output.config());
92 EXPECT_EQ(bitmap.width(), output.width());
93 EXPECT_EQ(bitmap.height(), output.height());
94 EXPECT_EQ(bitmap.rowBytes(), output.rowBytes());
95 EXPECT_EQ(bitmap.getSize(), output.getSize());
96 EXPECT_EQ(memcmp(bitmap.getPixels(), output.getPixels(), bitmap.getSize()),
108 const size_t bogus_pixels_size = bitmap.getSize() * 2;
112 // Make sure we don't read out the bitmap!