Home | History | Annotate | Download | only in tests

Lines Matching refs:pixels

133     static void Release(const void* pixels, void* context) {
268 SkPMColor pixels[4];
269 memset(pixels, 0xFF, sizeof(pixels)); // init with values we don't expect
274 REPORTER_ASSERT(reporter, image1->readPixels(dstInfo, pixels, dstRowBytes, 0, 0));
275 for (size_t i = 0; i < SK_ARRAY_COUNT(pixels); ++i) {
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);
612 static bool has_pixels(const SkPMColor pixels[], int count, SkPMColor expected) {
614 if (pixels[i] != expected) {
631 SkPMColor pixels[w*h];
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()));
646 sk_memset32(pixels, notExpected, w*h);
647 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, 0, 0));
648 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
651 sk_memset32(pixels, notExpected, w*h);
652 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
654 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
657 sk_memset32(pixels, notExpected, w*h);
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));
663 sk_memset32(pixels, notExpected, w*h);
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));
804 std::unique_ptr<uint32_t[]> pixels(new uint32_t[kWidth * kHeight]);
810 pixels.get(), kWidth, kHeight, kRGBA_8888_GrPixelConfig, true, GrMipMapped::kNo);
1253 // Verify that all pixels contain the original test color
1258 ERRORF(reporter, "Expected scaled pixels to be the same. At %d,%d 0x%08x != 0x%08x",