Lines Matching defs:info
71 size_t rowLen = bm.info().bytesPerPixel() * bm.width();
93 * Calling getPixels(info) should return expectedResult, and if goodDigest is non nullptr,
97 static void test_info(skiatest::Reporter* r, Codec* codec, const SkImageInfo& info,
100 bm.allocPixels(info);
102 SkCodec::Result result = codec->getPixels(info, bm.getPixels(), bm.rowBytes());
122 static void test_incremental_decode(skiatest::Reporter* r, SkCodec* codec, const SkImageInfo& info,
125 bm.allocPixels(info);
127 REPORTER_ASSERT(r, SkCodec::kSuccess == codec->startIncrementalDecode(info, bm.getPixels(),
136 static void test_in_stripes(skiatest::Reporter* r, SkCodec* codec, const SkImageInfo& info,
139 bm.allocPixels(info);
142 const int height = info.height();
157 SkIRect subset = SkIRect::MakeLTRB(0, y, info.width(),
161 if (SkCodec::kSuccess != codec->startIncrementalDecode(info, bm.getAddr(0, y),
179 const SkImageInfo& info, const SkISize& size, SkCodec::Result expectedResult,
182 REPORTER_ASSERT(r, info.dimensions() == size);
183 bm.allocPixels(info);
185 SkCodec::Result result = codec->getPixels(info, bm.getPixels(), bm.rowBytes());
195 SkImageInfo info565 = info.makeColorType(kRGB_565_SkColorType);
196 if (info.alphaType() == kOpaque_SkAlphaType) {
246 test_info(r, codec, info, expectedResult, digest);
250 if (info.alphaType() == kOpaque_SkAlphaType) {
251 test_info(r, codec, info.makeAlphaType(kUnpremul_SkAlphaType),
253 test_info(r, codec, info.makeAlphaType(kPremul_SkAlphaType),
257 test_info(r, codec, info.makeAlphaType(kOpaque_SkAlphaType),
259 SkAlphaType otherAt = info.alphaType();
266 test_info(r, codec, info.makeAlphaType(otherAt), expectedResult, nullptr);
288 const SkImageInfo& info,
299 test_codec(r, path, codec, bm, info, size, expectedResult, codecDigest, nullptr);
303 test_incremental_decode(r, codec, info, *codecDigest);
308 test_in_stripes(r, codec, info, *codecDigest);
315 const SkCodec::Result startResult = codec->startScanlineDecode(info);
321 for (int y = 0; y < info.height(); y++) {
339 REPORTER_ASSERT(r, codec->startScanlineDecode(info) == SkCodec::kSuccess);
344 REPORTER_ASSERT(r, codec->getPixels(bm.info(), bm.getPixels(), bm.rowBytes())
353 if (supports_partial_scanlines(path) && info.width() >= 3) {
355 int width = info.width();
356 int height = info.height();
360 const auto partialStartResult = codec->startScanlineDecode(info, &options);
377 const SkImageInfo& info,
398 SkImageInfo subsetInfo = info.makeDimensions(subset.size());
401 const auto result = codec->getPixels(bm.info(), bm.getPixels(), bm.rowBytes(), &opts);
420 const SkImageInfo& info,
438 test_codec(r, path, androidCodec.get(), bm, info, size, expectedResult, &androidCodecDigest,
445 const SkImageInfo& info,
455 bm.allocPixels(info);
456 REPORTER_ASSERT(r, gen->getPixels(info, bm.getPixels(), bm.rowBytes()));
467 test_info(r, codec.get(), info, SkCodec::kSuccess, &codecDigest);
504 const SkImageInfo info = codec->getInfo().makeColorType(kN32_SkColorType);
508 check_scanline_decode(r, codec.get(), &codecDigest, info, path, size, supportsScanlineDecoding,
511 check_subset_decode(r, codec.get(), info, size, supportsSubsetDecoding, supportsIncomplete);
513 check_android_codec(r, std::move(codec), codecDigest, info, path, size,
517 check_codec_image_generator(r, codecDigest, info, path, supportsIncomplete);
765 png_infop info = png_create_info_struct(png);
766 REPORTER_ASSERT(r, info);
767 if (!info) {
774 png_destroy_write_struct(&png, &info);
781 png_set_IHDR(png, info, (png_uint_32)w, (png_uint_32)h, 8,
793 png_set_unknown_chunks(png, info, gUnknowns, SK_ARRAY_COUNT(gUnknowns));
796 png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR);
797 png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR);
800 png_write_info(png, info);
806 png_write_end(png, info);
807 png_destroy_write_struct(&png, &info);
1115 static void check_round_trip(skiatest::Reporter* r, SkCodec* origCodec, const SkImageInfo& info) {
1117 bm1.allocPixels(info);
1118 SkCodec::Result result = origCodec->getPixels(info, bm1.getPixels(), bm1.rowBytes());
1125 REPORTER_ASSERT(r, color_type_match(info.colorType(), codec->getInfo().colorType()));
1126 REPORTER_ASSERT(r, alpha_type_match(info.alphaType(), codec->getInfo().alphaType()));
1129 bm2.allocPixels(info);
1130 result = codec->getPixels(info, bm2.getPixels(), bm2.rowBytes());
1240 auto info = codec->getInfo().makeColorType(kN32_SkColorType);
1241 bm.allocPixels(info);
1245 REPORTER_ASSERT(r, SkCodec::kSuccess == codec->getPixels(info,
1353 SkImageInfo info = codec->getInfo().makeColorType(kN32_SkColorType);
1355 bm.allocPixels(info);
1357 if (SkCodec::kUnimplemented != codec->startIncrementalDecode(info, bm.getPixels(),
1364 SkCodec::Result result = codec->startScanlineDecode(info);
1388 auto info = codec->getInfo().makeDimensions(size).makeColorType(kN32_SkColorType);
1390 bm.allocPixels(info);
1391 auto result = codec->getAndroidPixels(info, bm.getPixels(), bm.rowBytes(), &opts);
1394 info = codec->getInfo().makeColorType(kN32_SkColorType);
1395 bm.allocPixels(info);
1397 result = codec->getAndroidPixels(info, bm.getPixels(), bm.rowBytes(), &opts);
1415 auto info = codec->getInfo().makeColorType(kN32_SkColorType);
1417 bm.allocPixels(info);
1418 auto result = codec->startIncrementalDecode(info, bm.getPixels(), bm.rowBytes());
1553 const auto info = codec->getInfo().makeColorType(kN32_SkColorType);
1555 bm.allocPixels(info);
1563 auto result = codec->startIncrementalDecode(info, bm.getPixels(), bm.rowBytes(), &opts);
1762 auto info = codec->getInfo().makeDimensions(size);
1764 bm.allocPixels(info);
1769 auto result = codec->getAndroidPixels(info, bm.getPixels(), bm.rowBytes(), &options);
1788 auto info = codec->getInfo().makeColorType(kAlpha_8_SkColorType);
1790 bm.allocPixels(info);
1837 SkImageInfo info = codec->getInfo().makeColorType(kRGBA_F16_SkColorType)
1839 test_info(r, codec.get(), info, SkCodec::kSuccess, nullptr);
1875 SkImageInfo info = codec->getInfo().makeColorSpace(nullptr);
1877 bm.allocPixels(info);
1878 if (codec->getPixels(info, bm.getPixels(), bm.rowBytes()) != SkCodec::kSuccess) {