Lines Matching refs:image

139     SkImage* image = SkImage::NewRasterData(info, data, rowBytes);
141 image->unref();
191 static void test_image_readpixels(skiatest::Reporter* reporter, SkImage* image,
202 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, 0));
206 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, -w, 0));
207 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, -h));
208 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, image->width(), 0));
209 REPORTER_ASSERT(reporter, !image->readPixels(info, pixels, rowBytes, 0, image->height()));
213 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, 0, 0));
218 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
219 image->width() - w, image->height() - h));
224 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes, -1, -1));
230 REPORTER_ASSERT(reporter, image->readPixels(info, pixels, rowBytes,
231 image->width() - 1, image->height() - 1));
263 SkAutoTUnref<SkImage> image(createImage(gRec[i].fType, ctx, color));
264 if (!image.get()) {
268 const void* addr = image->peekPixels(&info, &rowBytes);
281 test_image_readpixels(reporter, image, pmcolor);
470 // be recycling a texture that is held by an existing image.
486 SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
487 GrTexture* texture = image->getTexture();
495 REPORTER_ASSERT(reporter, image->getTexture() == texture);
508 SkSurface::Budgeted is_budgeted(SkImage* image) {
509 return ((SkImage_Gpu*)image)->getTexture()->resourcePriv().isBudgeted() ?
524 SkAutoTUnref<SkImage> image(surface->newImageSnapshot(ibudgeted));
526 // Initially the image shares a texture with the surface, and the surface decides
529 REPORTER_ASSERT(reporter, sbudgeted == is_budgeted(image));
537 REPORTER_ASSERT(reporter, ibudgeted == is_budgeted(image));
634 static void test_image_color(skiatest::Reporter* reporter, SkImage* image, SkPMColor expected) {
637 REPORTER_ASSERT(reporter, image->readPixels(info, &pixel, sizeof(pixel), 0, 0));
681 // We expect the ref'd image to see the new color, but cpy'd one should still see the old color