Home
last modified time | relevance | path

Searched refs:bm1 (Results 1 – 14 of 14) sorted by relevance

/third_party/skia/docs/examples/
Dimage_to_bitmap_does_not_preserve_genid.cpp7 SkBitmap bm1, bm2; in draw() local
8 image->asLegacyBitmap(&bm1, SkImage::kRO_LegacyBitmapMode); in draw()
10 SkDebugf("%u\n%u\n", bm1.getGenerationID(), bm2.getGenerationID()); in draw()
/third_party/flutter/skia/tests/
DEncodeTest.cpp211 SkBitmap bm0, bm1, bm2; in DEF_TEST() local
213 SkImage::MakeFromEncoded(data1)->asLegacyBitmap(&bm1); in DEF_TEST()
215 REPORTER_ASSERT(r, almost_equals(bm0, bm1, 60)); in DEF_TEST()
216 REPORTER_ASSERT(r, almost_equals(bm1, bm2, 60)); in DEF_TEST()
325 SkBitmap bm0, bm1, bm2; in DEF_TEST() local
327 SkImage::MakeFromEncoded(data1)->asLegacyBitmap(&bm1); in DEF_TEST()
329 REPORTER_ASSERT(r, almost_equals(bm0, bm1, 0)); in DEF_TEST()
424 SkBitmap bm0, bm1, bm2, bm3; in DEF_TEST() local
426 SkImage::MakeFromEncoded(data1)->asLegacyBitmap(&bm1); in DEF_TEST()
429 REPORTER_ASSERT(r, almost_equals(bm0, bm1, 0)); in DEF_TEST()
DImageNewShaderTest.cpp17 static void test_bitmap_equality(skiatest::Reporter* reporter, SkBitmap& bm1, SkBitmap& bm2) { in test_bitmap_equality() argument
18 REPORTER_ASSERT(reporter, bm1.computeByteSize() == bm2.computeByteSize()); in test_bitmap_equality()
19 REPORTER_ASSERT(reporter, 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.computeByteSize())); in test_bitmap_equality()
DImageTest.cpp1242 SkBitmap bm1; in DEF_TEST() local
1243 bm1.allocPixels(SkImageInfo::MakeN32(256, 256, kPremul_SkAlphaType)); in DEF_TEST()
1244 img1->readPixels(bm1.info(), bm1.getPixels(), bm1.rowBytes(), 0, 0); in DEF_TEST()
1246 REPORTER_ASSERT(reporter, equal(bm0, bm1)); in DEF_TEST()
1253 SkBitmap bm1; in DEF_TEST() local
1254 bm1.allocPixels(SkImageInfo::MakeN32(256, 256, kUnpremul_SkAlphaType)); in DEF_TEST()
1255 bm0.readPixels(bm1.info(), bm1.getPixels(), bm1.rowBytes(), 0, 0); in DEF_TEST()
1259 bm1.readPixels(bm2.info(), bm2.getPixels(), bm2.rowBytes(), 0, 0); in DEF_TEST()
DCodecPartialTest.cpp46 static bool compare_bitmaps(skiatest::Reporter* r, const SkBitmap& bm1, const SkBitmap& bm2) { in compare_bitmaps() argument
47 const SkImageInfo& info = bm1.info(); in compare_bitmaps()
54 if (memcmp(bm1.getAddr(0, i), bm2.getAddr(0, i), rowBytes)) { in compare_bitmaps()
DCodecTest.cpp1066 SkBitmap bm1; in check_round_trip() local
1067 bm1.allocPixels(info); in check_round_trip()
1068 SkCodec::Result result = origCodec->getPixels(info, bm1.getPixels(), bm1.rowBytes()); in check_round_trip()
1072 auto data = SkEncodeBitmap(bm1, SkEncodedImageFormat::kPNG, 100); in check_round_trip()
1083 REPORTER_ASSERT(r, md5(bm1) == md5(bm2)); in check_round_trip()
/third_party/skia/tests/
DEncodeTest.cpp213 SkBitmap bm0, bm1, bm2; in DEF_TEST() local
215 SkImage::MakeFromEncoded(data1)->asLegacyBitmap(&bm1); in DEF_TEST()
217 REPORTER_ASSERT(r, almost_equals(bm0, bm1, 60)); in DEF_TEST()
218 REPORTER_ASSERT(r, almost_equals(bm1, bm2, 60)); in DEF_TEST()
327 SkBitmap bm0, bm1, bm2; in DEF_TEST() local
329 SkImage::MakeFromEncoded(data1)->asLegacyBitmap(&bm1); in DEF_TEST()
331 REPORTER_ASSERT(r, almost_equals(bm0, bm1, 0)); in DEF_TEST()
426 SkBitmap bm0, bm1, bm2, bm3; in DEF_TEST() local
428 SkImage::MakeFromEncoded(data1)->asLegacyBitmap(&bm1); in DEF_TEST()
431 REPORTER_ASSERT(r, almost_equals(bm0, bm1, 0)); in DEF_TEST()
DImageNewShaderTest.cpp17 static void test_bitmap_equality(skiatest::Reporter* reporter, SkBitmap& bm1, SkBitmap& bm2) { in test_bitmap_equality() argument
18 REPORTER_ASSERT(reporter, bm1.computeByteSize() == bm2.computeByteSize()); in test_bitmap_equality()
19 REPORTER_ASSERT(reporter, 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.computeByteSize())); in test_bitmap_equality()
DImageTest.cpp1288 SkBitmap bm1; in DEF_TEST() local
1289 bm1.allocPixels(SkImageInfo::MakeN32(256, 256, kPremul_SkAlphaType)); in DEF_TEST()
1290 img1->readPixels(nullptr, bm1.info(), bm1.getPixels(), bm1.rowBytes(), 0, 0); in DEF_TEST()
1292 REPORTER_ASSERT(reporter, equal(bm0, bm1)); in DEF_TEST()
1299 SkBitmap bm1; in DEF_TEST() local
1300 bm1.allocPixels(SkImageInfo::MakeN32(256, 256, kUnpremul_SkAlphaType)); in DEF_TEST()
1301 bm0.readPixels(bm1.info(), bm1.getPixels(), bm1.rowBytes(), 0, 0); in DEF_TEST()
1305 bm1.readPixels(bm2.info(), bm2.getPixels(), bm2.rowBytes(), 0, 0); in DEF_TEST()
DCodecPartialTest.cpp45 static bool compare_bitmaps(skiatest::Reporter* r, const SkBitmap& bm1, const SkBitmap& bm2) { in compare_bitmaps() argument
46 const SkImageInfo& info = bm1.info(); in compare_bitmaps()
53 if (0 != memcmp(bm1.getAddr(0, i), bm2.getAddr(0, i), rowBytes)) { in compare_bitmaps()
DCodecTest.cpp1116 SkBitmap bm1; in check_round_trip() local
1117 bm1.allocPixels(info); in check_round_trip()
1118 SkCodec::Result result = origCodec->getPixels(info, bm1.getPixels(), bm1.rowBytes()); in check_round_trip()
1122 auto data = SkEncodeBitmap(bm1, SkEncodedImageFormat::kPNG, 100); in check_round_trip()
1133 REPORTER_ASSERT(r, md5(bm1) == md5(bm2)); in check_round_trip()
/third_party/cups-filters/cupsfilters/
Drgb.c180 b, bi, bm0, bm1, bs; in cupsRGBDoRGB() local
271 bm1 = 256 - bm0; in cupsRGBDoRGB()
277 tempb = (color[0] * bm0 + color[bs] * bm1) / 256; in cupsRGBDoRGB()
279 tempb = (color[gs] * gm0 + color[gs + bs] * bm1) / 256; in cupsRGBDoRGB()
284 tempb = (color[rs] * bm0 + color[rs + bs] * bm1) / 256; in cupsRGBDoRGB()
286 tempb = (color[rs + gs] * bm0 + color[rs + gs + bs] * bm1) / 256; in cupsRGBDoRGB()
/third_party/flutter/skia/tools/
DToolUtils.cpp429 bool equal_pixels(const SkBitmap& bm0, const SkBitmap& bm1) { in equal_pixels() argument
431 return bm0.peekPixels(&pm0) && bm1.peekPixels(&pm1) && equal_pixels(pm0, pm1); in equal_pixels()
/third_party/skia/tools/
DToolUtils.cpp454 bool equal_pixels(const SkBitmap& bm0, const SkBitmap& bm1) { in equal_pixels() argument
456 return bm0.peekPixels(&pm0) && bm1.peekPixels(&pm1) && equal_pixels(pm0, pm1); in equal_pixels()