Home | History | Annotate | Download | only in tests

Lines Matching full:reporter

69 static void test_image(skiatest::Reporter* reporter) {
76 REPORTER_ASSERT(reporter, 1 == data->getRefCnt());
78 REPORTER_ASSERT(reporter, 2 == data->getRefCnt());
80 REPORTER_ASSERT(reporter, 1 == data->getRefCnt());
115 static void test_imagepeek(skiatest::Reporter* reporter) {
139 REPORTER_ASSERT(reporter, gRec[i].fPeekShouldSucceed == success);
141 REPORTER_ASSERT(reporter, 10 == info.fWidth);
142 REPORTER_ASSERT(reporter, 10 == info.fHeight);
143 REPORTER_ASSERT(reporter, kN32_SkColorType == info.fColorType);
144 REPORTER_ASSERT(reporter, kPremul_SkAlphaType == info.fAlphaType ||
146 REPORTER_ASSERT(reporter, info.minRowBytes() <= rowBytes);
147 REPORTER_ASSERT(reporter, pmcolor == *(const SkPMColor*)addr);
152 static void test_canvaspeek(skiatest::Reporter* reporter,
184 REPORTER_ASSERT(reporter, gRec[i].fPeekShouldSucceed == success);
191 REPORTER_ASSERT(reporter, requestInfo == info);
192 REPORTER_ASSERT(reporter, requestInfo.minRowBytes() <= rowBytes);
193 REPORTER_ASSERT(reporter, pmcolor == *(const SkPMColor*)addr);
195 REPORTER_ASSERT(reporter, addr2 == addr);
196 REPORTER_ASSERT(reporter, info2 == info);
197 REPORTER_ASSERT(reporter, rb2 == rowBytes);
199 REPORTER_ASSERT(reporter, NULL == addr2);
204 static void TestSurfaceCopyOnWrite(skiatest::Reporter* reporter, SurfaceType surfaceType,
266 REPORTER_ASSERT(reporter, imageBefore != imageAfter); \
289 static void TestSurfaceWritableAfterSnapshotRelease(skiatest::Reporter* reporter,
303 static void TestSurfaceInCache(skiatest::Reporter* reporter,
310 REPORTER_ASSERT(reporter, 0 == resourceCount);
316 REPORTER_ASSERT(reporter, expectedCachedResources == resourceCount);
321 REPORTER_ASSERT(reporter, expectedCachedResources == resourceCount);
327 REPORTER_ASSERT(reporter, 0 == resourceCount);
330 static void Test_crbug263329(skiatest::Reporter* reporter,
356 REPORTER_ASSERT(reporter, image4->getTexture() != image3->getTexture());
358 REPORTER_ASSERT(reporter, image4->getTexture() != image2->getTexture());
359 REPORTER_ASSERT(reporter, image4->getTexture() != image1->getTexture());
360 REPORTER_ASSERT(reporter, image3->getTexture() != image2->getTexture());
361 REPORTER_ASSERT(reporter, image3->getTexture() != image1->getTexture());
362 REPORTER_ASSERT(reporter, image2->getTexture() != image1->getTexture());
365 static void TestGetTexture(skiatest::Reporter* reporter,
372 REPORTER_ASSERT(reporter, NULL != texture);
373 REPORTER_ASSERT(reporter, 0 != texture->getTextureHandle());
375 REPORTER_ASSERT(reporter, NULL == texture);
378 REPORTER_ASSERT(reporter, image->getTexture() == texture);
382 static void TestSurfaceNoCanvas(skiatest::Reporter* reporter,
409 REPORTER_ASSERT(reporter, image1 != image2);
414 reporter, factory) {
415 test_image(reporter);
417 TestSurfaceCopyOnWrite(reporter, kRaster_SurfaceType, NULL);
418 TestSurfaceWritableAfterSnapshotRelease(reporter, kRaster_SurfaceType, NULL);
419 TestSurfaceNoCanvas(reporter, kRaster_SurfaceType, NULL, SkSurface::kDiscard_ContentChangeMode);
420 TestSurfaceNoCanvas(reporter, kRaster_SurfaceType, NULL, SkSurface::kRetain_ContentChangeMode);
422 test_imagepeek(reporter);
423 test_canvaspeek(reporter, factory);
426 TestGetTexture(reporter, kRaster_SurfaceType, NULL);
430 TestSurfaceInCache(reporter, kGpu_SurfaceType, context);
431 TestSurfaceInCache(reporter, kGpuScratch_SurfaceType, context);
432 Test_crbug263329(reporter, kGpu_SurfaceType, context);
433 Test_crbug263329(reporter, kGpuScratch_SurfaceType, context);
434 TestSurfaceCopyOnWrite(reporter, kGpu_SurfaceType, context);
435 TestSurfaceCopyOnWrite(reporter, kGpuScratch_SurfaceType, context);
436 TestSurfaceWritableAfterSnapshotRelease(reporter, kGpu_SurfaceType, context);
437 TestSurfaceWritableAfterSnapshotRelease(reporter, kGpuScratch_SurfaceType, context);
438 TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kDiscard_ContentChangeMode);
439 TestSurfaceNoCanvas(reporter, kGpuScratch_SurfaceType, context, SkSurface::kDiscard_ContentChangeMode);
440 TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kRetain_ContentChangeMode);
441 TestSurfaceNoCanvas(reporter, kGpuScratch_SurfaceType, context, SkSurface::kRetain_ContentChangeMode);
442 TestGetTexture(reporter, kGpu_SurfaceType, context);
443 TestGetTexture(reporter, kGpuScratch_SurfaceType, context);