Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

169 static bool check_read(skiatest::Reporter* reporter,
203 ERRORF(reporter, "Expected readback pixel value 0x%08x, got 0x%08x. "
211 ERRORF(reporter, "Expected clipped out area of readback to be unchanged. "
327 static void test_readpixels(skiatest::Reporter* reporter, SkSurface* surface,
353 REPORTER_ASSERT(reporter, success == expectSuccess);
355 REPORTER_ASSERT(reporter, idBefore == idAfter);
358 check_read(reporter, bmp, srcRect.fLeft, srcRect.fTop,
363 REPORTER_ASSERT(reporter, bmp.isNull());
372 REPORTER_ASSERT(reporter, success);
373 REPORTER_ASSERT(reporter, kN32_SkColorType == wkbmp.colorType());
374 REPORTER_ASSERT(reporter, kPremul_SkAlphaType == wkbmp.alphaType());
375 check_read(reporter, wkbmp, clippedRect.fLeft,
378 REPORTER_ASSERT(reporter, !success);
383 DEF_TEST(ReadPixels, reporter) {
387 test_readpixels(reporter, surface, kLastAligned_BitmapInit);
390 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Gpu, reporter, context) {
402 test_readpixels(reporter, surface, kLast_BitmapInit);
408 static void test_readpixels_texture(skiatest::Reporter* reporter, GrTexture* texture) {
437 check_read(reporter, bmp, srcRect.fLeft, srcRect.fTop,
444 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, context) {
456 test_readpixels_texture(reporter, texture);
533 static void compare_textures(skiatest::Reporter* reporter, GrTexture* txa, GrTexture* txb) {
534 REPORTER_ASSERT(reporter, txa->width() == 2);
535 REPORTER_ASSERT(reporter, txa->height() == 2);
536 REPORTER_ASSERT(reporter, txb->width() == 2);
537 REPORTER_ASSERT(reporter, txb->height() == 2);
538 REPORTER_ASSERT(reporter, txa->config() == txb->config());
541 REPORTER_ASSERT(reporter, txa->readPixels(0, 0, 2, 2, txa->config(), pixelsA));
542 REPORTER_ASSERT(reporter, txb->readPixels(0, 0, 2, 2, txa->config(), pixelsB));
543 REPORTER_ASSERT(reporter, 0 == memcmp(pixelsA, pixelsB, sizeof(pixelsA)));
579 DEF_GPUTEST_FOR_NATIVE_CONTEXT(ReadPixels_Subset_Gpu, reporter, context) {
602 compare_textures(reporter, bm_subset.getTexture(), tx_subset.getTexture());
619 REPORTER_ASSERT(reporter, dataA->equals(dataB));