Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

55 static void test_image(const sk_sp<SkSpecialImage>& img, skiatest::Reporter* reporter,
59 REPORTER_ASSERT(reporter, offset == subset.left());
60 REPORTER_ASSERT(reporter, offset == subset.top());
61 REPORTER_ASSERT(reporter, kSmallerSize == subset.width());
62 REPORTER_ASSERT(reporter, kSmallerSize == subset.height());
66 REPORTER_ASSERT(reporter, isGPUBacked == img->isTextureBacked());
73 REPORTER_ASSERT(reporter, proxy);
80 REPORTER_ASSERT(reporter, img->getROPixels(&bitmap));
82 REPORTER_ASSERT(reporter, kSmallerSize == bitmap.width());
83 REPORTER_ASSERT(reporter, kSmallerSize == bitmap.height());
85 REPORTER_ASSERT(reporter, size == bitmap.width());
86 REPORTER_ASSERT(reporter, size == bitmap.height());
107 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kPad-1, kPad-1));
108 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kPad, kPad));
109 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kSmallerSize+kPad-1,
111 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kSmallerSize+kPad,
121 REPORTER_ASSERT(reporter, tightImg->width() == subset.width());
122 REPORTER_ASSERT(reporter, tightImg->height() == subset.height());
123 REPORTER_ASSERT(reporter, isGPUBacked == tightImg->isTextureBacked());
125 REPORTER_ASSERT(reporter, isGPUBacked != !!tightImg->peekPixels(&tmpPixmap));
131 REPORTER_ASSERT(reporter, tightSurf->width() == subset.width());
132 REPORTER_ASSERT(reporter, tightSurf->height() == subset.height());
133 REPORTER_ASSERT(reporter, isGPUBacked ==
136 REPORTER_ASSERT(reporter, isGPUBacked != !!tightSurf->peekPixels(&tmpPixmap));
140 DEF_TEST(SpecialImage_Raster, reporter) {
151 test_image(subSImg1, reporter, nullptr, false, kPad, kFullSize);
156 test_image(subSImg2, reporter, nullptr, false, 0, kSmallerSize);
160 static void test_specialimage_image(skiatest::Reporter* reporter, SkColorSpace* dstColorSpace) {
174 test_image(subSImg1, reporter, nullptr, false, kPad, kFullSize);
179 test_image(subSImg2, reporter, nullptr, false, 0, kSmallerSize);
183 DEF_TEST(SpecialImage_Image_Legacy, reporter) {
185 test_specialimage_image(reporter, legacyColorSpace);
188 DEF_TEST(SpecialImage_Image_ColorSpaceAware, reporter) {
190 test_specialimage_image(reporter, srgbColorSpace.get());
195 static void test_texture_backed(skiatest::Reporter* reporter,
198 REPORTER_ASSERT(reporter, gpuBacked);
199 REPORTER_ASSERT(reporter, gpuBacked->isTextureBacked());
200 REPORTER_ASSERT(reporter, gpuBacked->uniqueID() == orig->uniqueID());
201 REPORTER_ASSERT(reporter, gpuBacked->subset().width() == orig->subset().width() &&
203 REPORTER_ASSERT(reporter, gpuBacked->getColorSpace() == orig->getColorSpace());
207 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_MakeTexture, reporter, ctxInfo) {
222 test_texture_backed(reporter, rasterImage, fromRaster);
229 test_texture_backed(reporter, subRasterImage, fromSubRaster);
252 test_texture_backed(reporter, gpuImage, fromGPU);
259 test_texture_backed(reporter, subGPUImage, fromSubGPU);
264 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, ctxInfo) {
290 test_image(subSImg1, reporter, context, true, kPad, kFullSize);
295 test_image(subSImg2, reporter, context, true, kPad, kFullSize);
299 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_DeferredGpu, reporter, ctxInfo) {
329 test_image(subSImg1, reporter, context, true, kPad, kFullSize);
334 test_image(subSImg2, reporter, context, true, kPad, kFullSize);