Home | History | Annotate | Download | only in tests

Lines Matching refs: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(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(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);
518 static bool has_pixels(const SkPMColor pixels[], int count, SkPMColor expected) {
520 if (pixels[i] != expected) {
537 SkPMColor pixels[w*h];
542 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, 0));
546 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, -w, 0));
547 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, -h));
548 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, image->width(), 0));
549 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, image->height()));
552 sk_memset32(pixels, notExpected, w*h);
553 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, 0, 0));
554 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
557 sk_memset32(pixels, notExpected, w*h);
558 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
560 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h, expected));
563 sk_memset32(pixels, notExpected, w*h);
564 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, -1, -1));
565 REPORTER_ASSERT(reporter, pixels[3] == expected);
566 REPORTER_ASSERT(reporter, has_pixels(pixels, w*h - 1, notExpected));
569 sk_memset32(pixels, notExpected, w*h);
570 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
572 REPORTER_ASSERT(reporter, pixels[0] == expected);
573 REPORTER_ASSERT(reporter, has_pixels(&pixels[1], w*h - 1, notExpected));
724 std::unique_ptr<uint32_t[]> pixels(new uint32_t[kWidth * kHeight]);
730 pixels.get(), kWidth, kHeight, kRGBA_8888_GrPixelConfig, true, GrMipMapped::kNo);
954 ERRORF(reporter, "Could not read image a's pixels");
958 ERRORF(reporter, "Could not read image b's pixels");
967 ERRORF(reporter, "Expected image pixels to be the same. At %d,%d 0x%08x != 0x%08x",
1342 // Verify that all pixels contain the original test color
1347 ERRORF(reporter, "Expected scaled pixels to be the same. At %d,%d 0x%08x != 0x%08x",