Home | History | Annotate | Download | only in tests

Lines Matching refs:REPORTER_ASSERT

59     REPORTER_ASSERT(reporter, widthA == b->width());
60 REPORTER_ASSERT(reporter, heightA == b->height());
63 //REPORTER_ASSERT(reporter, a->isOpaque() == b->isOpaque());
72 REPORTER_ASSERT(reporter, a->readPixels(pmapA, srcX, srcY));
73 REPORTER_ASSERT(reporter, b->readPixels(pmapB, 0, 0));
77 REPORTER_ASSERT(reporter, !memcmp(pmapA.addr32(0, y), pmapB.addr32(0, y), widthBytes));
166 REPORTER_ASSERT(reporter, origEncoded);
167 REPORTER_ASSERT(reporter, origEncoded->size() > 0);
174 REPORTER_ASSERT(reporter, decoded);
180 REPORTER_ASSERT(reporter, decoded);
210 REPORTER_ASSERT(reporter, img->peekPixels(&pm));
212 REPORTER_ASSERT(reporter, rec.fExpectSameAsMutable == sameMutable);
213 REPORTER_ASSERT(reporter, (bm.getGenerationID() == img->uniqueID()) == sameMutable);
219 REPORTER_ASSERT(reporter, img->peekPixels(&pm));
221 REPORTER_ASSERT(reporter, rec.fExpectSameAsImmutable == sameImmutable);
222 REPORTER_ASSERT(reporter, (bm.getGenerationID() == img->uniqueID()) == sameImmutable);
231 REPORTER_ASSERT(reporter, image);
237 REPORTER_ASSERT(reporter, picture);
238 REPORTER_ASSERT(reporter, picture->approximateOpCount() > 0);
248 REPORTER_ASSERT(reporter, !was_called);
250 REPORTER_ASSERT(reporter, was_called);
251 REPORTER_ASSERT(reporter, data && data->size() > 0);
254 REPORTER_ASSERT(reporter, deserialized);
255 REPORTER_ASSERT(reporter, deserialized->approximateOpCount() > 0);
274 REPORTER_ASSERT(reporter, image1->readPixels(dstInfo, pixels, dstRowBytes, 0, 0));
276 REPORTER_ASSERT(reporter, pixels[i] == green);
286 REPORTER_ASSERT(reporter, image2->readPixels(dstInfo, pixels, dstRowBytes, 0, 0));
287 REPORTER_ASSERT(reporter, pixels[0] == green);
288 REPORTER_ASSERT(reporter, pixels[1] == green);
289 REPORTER_ASSERT(reporter, pixels[2] == green);
290 REPORTER_ASSERT(reporter, pixels[3] == red);
323 REPORTER_ASSERT(reporter, sharedID == rec[i].fExpectSharedID);
326 REPORTER_ASSERT(reporter, peekSuccess == rec[i].fExpectPeekSuccess);
329 REPORTER_ASSERT(reporter, lazy == rec[i].fExpectLazy);
358 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(desc, &cachedBitmap));
365 REPORTER_ASSERT(reporter, cachedBitmap.getGenerationID() == uniqueID);
366 REPORTER_ASSERT(reporter, cachedBitmap.isImmutable());
367 REPORTER_ASSERT(reporter, cachedBitmap.getPixels());
378 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(desc, &cachedBitmap));
467 REPORTER_ASSERT(reporter, image->makeNonTextureImage().get() == image.get());
476 REPORTER_ASSERT(reporter, !rasterImage->isTextureBacked());
501 REPORTER_ASSERT(reporter, can == SkToBool(img),
593 REPORTER_ASSERT(reporter, nullptr == SkImage::MakeRasterCopy(pmap));
594 REPORTER_ASSERT(reporter, nullptr == SkImage::MakeRasterData(info, nullptr, 0));
595 REPORTER_ASSERT(reporter, nullptr == SkImage::MakeFromRaster(pmap, nullptr, nullptr));
596 REPORTER_ASSERT(reporter, nullptr == SkImage::MakeFromGenerator(
605 REPORTER_ASSERT(reporter, data->unique());
607 REPORTER_ASSERT(reporter, !data->unique());
609 REPORTER_ASSERT(reporter, data->unique());
636 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, 0));
640 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, -w, 0));
641 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, -h));
642 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, image->width(), 0));
643 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, image->height()));
647 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, 0, 0));
648 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
652 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
654 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
658 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, -1, -1));
659 REPORTER_ASSERT(reporter, pixels[3] == expected);
660 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h - 1, notExpected));
664 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
666 REPORTER_ASSERT(reporter, pixels[0] == expected);
667 REPORTER_ASSERT(reporter, has_pixels(&pixels[1], w*h - 1, notExpected));
680 REPORTER_ASSERT(reporter, 1 == dataHolder.fReleaseCount);
693 REPORTER_ASSERT(reporter, image->width() == bitmap.width());
694 REPORTER_ASSERT(reporter, image->height() == bitmap.height());
695 REPORTER_ASSERT(reporter, image->alphaType() == bitmap.alphaType());
697 REPORTER_ASSERT(reporter, bitmap.isImmutable());
699 REPORTER_ASSERT(reporter, bitmap.getPixels());
703 REPORTER_ASSERT(reporter, image->readPixels(info, &imageColor, sizeof(SkPMColor), 0, 0));
704 REPORTER_ASSERT(reporter, imageColor == *bitmap.getAddr32(0, 0));
713 REPORTER_ASSERT(reporter, image->asLegacyBitmap(&bitmap));
718 REPORTER_ASSERT(reporter, bitmap.extractSubset(&tmp, SkIRect::MakeWH(image->width() / 2,
721 REPORTER_ASSERT(reporter, subsetImage.get());
724 REPORTER_ASSERT(reporter, subsetImage->asLegacyBitmap(&subsetBitmap));
738 REPORTER_ASSERT(reporter, 1 == dataHolder.fReleaseCount);
757 REPORTER_ASSERT(reporter, expectPeekSuccess == success);
760 REPORTER_ASSERT(reporter, 20 == info.width());
761 REPORTER_ASSERT(reporter, 20 == info.height());
762 REPORTER_ASSERT(reporter, kN32_SkColorType == info.colorType());
763 REPORTER_ASSERT(reporter, kPremul_SkAlphaType == info.alphaType() ||
765 REPORTER_ASSERT(reporter, info.minRowBytes() <= pm.rowBytes());
766 REPORTER_ASSERT(reporter, SkPreMultiplyColor(SK_ColorWHITE) == *pm.addr32(0, 0));
780 REPORTER_ASSERT(reporter, 1 == dataHolder.fReleaseCount);
827 REPORTER_ASSERT(reporter, readBackHandle == backendTexHandle);
829 REPORTER_ASSERT(reporter, SkToBool(readBackHandle));
834 REPORTER_ASSERT(reporter, readBackOrigin == texOrigin);
837 REPORTER_ASSERT(reporter, 0 == releaseChecker.fReleaseCount);
839 REPORTER_ASSERT(reporter, 1 == releaseChecker.fReleaseCount);
960 REPORTER_ASSERT(reporter, proxy);
966 REPORTER_ASSERT(reporter, !otherProxy);
972 REPORTER_ASSERT(reporter, proxySecondRef);
982 REPORTER_ASSERT(reporter, !otherProxy);
992 REPORTER_ASSERT(reporter, otherProxy);
1053 REPORTER_ASSERT(reporter, proxy);
1125 REPORTER_ASSERT(r, srgb.get() == image->colorSpace());
1130 REPORTER_ASSERT(r, success);
1131 REPORTER_ASSERT(r, color_space_almost_equal(1.8f, fn.fG));
1136 REPORTER_ASSERT(r, SkColorSpace::Equals(rec2020.get(), image->colorSpace()));
1142 REPORTER_ASSERT(r, SkColorSpace::Equals(rec2020.get(), image->colorSpace()));
1147 REPORTER_ASSERT(r, nullptr == image->colorSpace());
1151 REPORTER_ASSERT(r, SkColorSpace::Equals(rec2020.get(), image->colorSpace()));
1169 REPORTER_ASSERT(r, success);
1170 REPORTER_ASSERT(r, almost_equal(0x28, SkGetPackedR32(*p3Bitmap.getAddr32(0, 0))));
1171 REPORTER_ASSERT(r, almost_equal(0x40, SkGetPackedG32(*p3Bitmap.getAddr32(0, 0))));
1172 REPORTER_ASSERT(r, almost_equal(0x5E, SkGetPackedB32(*p3Bitmap.getAddr32(0, 0))));
1178 REPORTER_ASSERT(r, success);
1179 REPORTER_ASSERT(r, almost_equal(0x21, SkGetPackedR32(*adobeBitmap.getAddr32(0, 0))));
1180 REPORTER_ASSERT(r, almost_equal(0x31, SkGetPackedG32(*adobeBitmap.getAddr32(0, 0))));
1181 REPORTER_ASSERT(r, almost_equal(0x4C, SkGetPackedB32(*adobeBitmap.getAddr32(0, 0))));
1186 REPORTER_ASSERT(r, success);
1187 REPORTER_ASSERT(r, almost_equal(0x8B, SkGetPackedR32(*p3Bitmap.getAddr32(0, 0))));
1188 REPORTER_ASSERT(r, almost_equal(0x82, SkGetPackedG32(*p3Bitmap.getAddr32(0, 0))));
1189 REPORTER_ASSERT(r, almost_equal(0x77, SkGetPackedB32(*p3Bitmap.getAddr32(0, 0))));
1232 REPORTER_ASSERT(reporter, equal(bm0, bm1));
1247 REPORTER_ASSERT(reporter, equal(bm0, bm2));
1336 REPORTER_ASSERT(reporter, *(SkPMColor*)addr == 0);