Home | History | Annotate | Download | only in dm

Lines Matching defs:decodeInfo

342 static bool get_decode_info(SkImageInfo* decodeInfo, SkColorType canvasColorType,
349 *decodeInfo = decodeInfo->makeColorType(kIndex_8_SkColorType);
355 *decodeInfo = decodeInfo->makeColorType(kGray_8_SkColorType);
362 *decodeInfo = decodeInfo->makeColorType(kBGRA_8888_SkColorType);
364 *decodeInfo = decodeInfo->makeColorType(kRGBA_8888_SkColorType);
369 kOpaque_SkAlphaType != decodeInfo->alphaType()) {
380 as_CSB(decodeInfo->colorSpace())->makeLinearGamma();
381 *decodeInfo = decodeInfo->makeColorSpace(std::move(linearSpace));
384 *decodeInfo = decodeInfo->makeColorType(canvasColorType);
388 *decodeInfo = decodeInfo->makeAlphaType(dstAlphaType);
414 SkImageInfo decodeInfo = codec->getInfo();
415 if (!get_decode_info(&decodeInfo, canvas->imageInfo().colorType(), fDstColorType,
422 if (size == decodeInfo.dimensions() && 1.0f != fScale) {
431 decodeInfo = decodeInfo
433 const int bpp = SkColorTypeBytesPerPixel(decodeInfo.colorType());
435 const size_t safeSize = decodeInfo.getSafeSize(rowBytes);
446 SkImageInfo bitmapInfo = decodeInfo;
447 if (kRGBA_8888_SkColorType == decodeInfo.colorType() ||
448 kBGRA_8888_SkColorType == decodeInfo.colorType()) {
480 SkCodec::Result result = codec->getPixels(decodeInfo, pixels.get(),
492 const int xTranslate = (i % factor) * decodeInfo.width();
493 const int yTranslate = (i / factor) * decodeInfo.height();
503 if (i > 0 && (decodeInfo.colorType() == kRGB_565_SkColorType
504 || decodeInfo.colorType() == kIndex_8_SkColorType)) {
525 switch (codec->getPixels(decodeInfo, pixels.get(), rowBytes, &options,
543 uint32_t height = decodeInfo.height();
558 if (SkCodec::kSuccess == codec->startIncrementalDecode(decodeInfo, dst,
562 codec->fillIncompleteImage(decodeInfo, dst, rowBytes,
578 if (SkCodec::kSuccess != codec->startScanlineDecode(decodeInfo, NULL, colorPtr,
597 const int height = decodeInfo.height();
605 if (SkCodec::kSuccess != codec->startScanlineDecode(decodeInfo, nullptr, colorPtr,
631 const SkCodec::Result startResult = codec->startScanlineDecode(decodeInfo, nullptr,
654 const int width = decodeInfo.width();
655 const int height = decodeInfo.height();
666 if (SkCodec::kSuccess != codec->startScanlineDecode(decodeInfo, &opts,
701 // where the last one ended. So we'll add decodeInfo.width() and height().
715 decodeInfo = decodeInfo.makeWH(scaledW, scaledH);
718 const SkCodec::Result result = codec->getPixels(decodeInfo, dst, subsetRowBytes,
727 x, y, decodeInfo.width(), decodeInfo.height(),
735 top += decodeInfo.height();
738 left += decodeInfo.width();
809 SkImageInfo decodeInfo = codec->getInfo();
810 if (!get_decode_info(&decodeInfo, canvas->imageInfo().colorType(), fDstColorType,
823 decodeInfo = decodeInfo.makeWH(size.width(), size.height());
825 int bpp = SkColorTypeBytesPerPixel(decodeInfo.colorType());
832 SkImageInfo bitmapInfo = decodeInfo;
833 if (kRGBA_8888_SkColorType == decodeInfo.colorType() ||
834 kBGRA_8888_SkColorType == decodeInfo.colorType()) {
844 switch (codec->getAndroidPixels(decodeInfo, pixels.get(), rowBytes, &options)) {
947 SkImageInfo decodeInfo = gen->getInfo().makeAlphaType(fDstAlphaType);
949 int bpp = SkColorTypeBytesPerPixel(decodeInfo.colorType());
950 size_t rowBytes = decodeInfo.width() * bpp;
951 SkAutoMalloc pixels(decodeInfo.height() * rowBytes);
955 if (!gen->getPixels(decodeInfo, pixels.get(), rowBytes, colorPtr, &colorCount)) {
969 draw_to_canvas(canvas, decodeInfo, pixels.get(), rowBytes, colorPtr, colorCount,
1036 SkImageInfo decodeInfo = codec->getInfo().makeColorType(fColorType).makeColorSpace(dstSpace);
1037 if (kUnpremul_SkAlphaType == decodeInfo.alphaType()) {
1038 decodeInfo = decodeInfo.makeAlphaType(kPremul_SkAlphaType);
1041 SkASSERT(SkColorSpace_Base::Type::kXYZ == as_CSB(decodeInfo.colorSpace())->type());
1042 SkColorSpace_XYZ* csXYZ = static_cast<SkColorSpace_XYZ*>(decodeInfo.colorSpace());
1043 decodeInfo = decodeInfo.makeColorSpace(csXYZ->makeLinearGamma());
1046 SkImageInfo bitmapInfo = decodeInfo;
1047 if (kRGBA_8888_SkColorType == decodeInfo.colorType() ||
1048 kBGRA_8888_SkColorType == decodeInfo.colorType())
1060 SkCodec::Result r = codec->getPixels(decodeInfo, bitmap.getPixels(), rowBytes);