Lines Matching defs:pixels
132 static void Release(const void* pixels, void* context) {
267 SkPMColor pixels[4];
268 memset(pixels, 0xFF, sizeof(pixels)); // init with values we don't expect
273 REPORTER_ASSERT(reporter, image1->readPixels(nullptr, dstInfo, pixels, dstRowBytes, 0, 0));
274 for (size_t i = 0; i < SK_ARRAY_COUNT(pixels); ++i) {
275 REPORTER_ASSERT(reporter, pixels[i] == green);
285 REPORTER_ASSERT(reporter, image2->readPixels(nullptr, dstInfo, pixels, dstRowBytes, 0, 0));
286 REPORTER_ASSERT(reporter, pixels[0] == green);
287 REPORTER_ASSERT(reporter, pixels[1] == green);
288 REPORTER_ASSERT(reporter, pixels[2] == green);
289 REPORTER_ASSERT(reporter, pixels[3] == red);
647 static bool has_pixels(const SkPMColor pixels[], int count, SkPMColor expected) {
649 if (pixels[i] != expected) {
667 SkPMColor pixels[w*h];
672 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, 0, 0));
676 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, -w, 0));
677 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, 0, -h));
678 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes,
680 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes,
684 sk_memset32(pixels, notExpected, w*h);
685 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes, 0, 0));
686 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
689 sk_memset32(pixels, notExpected, w*h);
690 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes,
692 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
695 sk_memset32(pixels, notExpected, w*h);
696 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes, -1, -1));
697 REPORTER_ASSERT(reporter, pixels[3] == expected);
698 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h - 1, notExpected));
701 sk_memset32(pixels, notExpected, w*h);
702 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes,
704 REPORTER_ASSERT(reporter, pixels[0] == expected);
705 REPORTER_ASSERT(reporter, has_pixels(&pixels[1], w*h - 1, notExpected));
1313 // Verify that all pixels contain the original test color
1318 ERRORF(reporter, "Expected scaled pixels to be the same. At %d,%d 0x%08x != 0x%08x",