/third_party/skia/src/core/ |
D | SkConvertPixels.cpp | 18 const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRB, in rect_memcpy() argument 21 if (dstInfo.colorType() != srcInfo.colorType()) { in rect_memcpy() 35 const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRB, in swizzle_or_premul() argument 41 !is_8888(srcInfo.colorType()) || in swizzle_or_premul() 49 const bool swapRB = dstInfo.colorType() != srcInfo.colorType(); in swizzle_or_premul() 71 const SkImageInfo& srcInfo, const void* src, size_t srcRB, in convert_to_alpha8() argument 78 switch (srcInfo.colorType()) { in convert_to_alpha8() 89 for (int y = 0; y < srcInfo.height(); y++) { in convert_to_alpha8() 90 for (int x = 0; x < srcInfo.width(); x++) { in convert_to_alpha8() 107 for (int y = 0; y < srcInfo.height(); ++y) { in convert_to_alpha8() [all …]
|
/third_party/flutter/skia/src/core/ |
D | SkConvertPixels.cpp | 18 const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRB, in rect_memcpy() argument 21 if (dstInfo.colorType() != srcInfo.colorType()) { in rect_memcpy() 35 const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRB, in swizzle_or_premul() argument 41 !is_8888(srcInfo.colorType()) || in swizzle_or_premul() 49 const bool swapRB = dstInfo.colorType() != srcInfo.colorType(); in swizzle_or_premul() 71 const SkImageInfo& srcInfo, const void* src, size_t srcRB, in convert_to_alpha8() argument 78 switch (srcInfo.colorType()) { in convert_to_alpha8() 91 for (int y = 0; y < srcInfo.height(); ++y) { in convert_to_alpha8() 92 memset(dst, 0xFF, srcInfo.width()); in convert_to_alpha8() 100 for (int y = 0; y < srcInfo.height(); y++) { in convert_to_alpha8() [all …]
|
/third_party/flutter/skia/src/images/ |
D | SkPngEncoder.cpp | 56 bool setHeader(const SkImageInfo& srcInfo, const SkPngEncoder::Options& options); 58 bool writeInfo(const SkImageInfo& srcInfo); 59 void chooseProc(const SkImageInfo& srcInfo); 100 bool SkPngEncoderMgr::setHeader(const SkImageInfo& srcInfo, const SkPngEncoder::Options& options) { in setHeader() argument 108 switch (srcInfo.colorType()) { in setHeader() 117 pngColorType = srcInfo.isOpaque() ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGB_ALPHA; in setHeader() 124 SkASSERT(srcInfo.isOpaque()); in setHeader() 132 pngColorType = srcInfo.isOpaque() ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGB_ALPHA; in setHeader() 133 fPngBytesPerPixel = srcInfo.isOpaque() ? 3 : 4; in setHeader() 141 SkASSERT(srcInfo.isOpaque()); in setHeader() [all …]
|
D | SkJpegEncoder.cpp | 39 bool setParams(const SkImageInfo& srcInfo, const SkJpegEncoder::Options& options); 69 bool SkJpegEncoderMgr::setParams(const SkImageInfo& srcInfo, const SkJpegEncoder::Options& options) in setParams() argument 72 if (kUnpremul_SkAlphaType == srcInfo.alphaType() && in setParams() 81 switch (srcInfo.colorType()) { in setParams() 107 SkASSERT(srcInfo.isOpaque()); in setParams() 112 if (kUnpremul_SkAlphaType == srcInfo.alphaType() && in setParams() 125 fCInfo.image_width = srcInfo.width(); in setParams() 126 fCInfo.image_height = srcInfo.height(); in setParams() 131 if (kGray_8_SkColorType != srcInfo.colorType()) { in setParams()
|
/third_party/skia/src/images/ |
D | SkPngEncoder.cpp | 57 bool setHeader(const SkImageInfo& srcInfo, const SkPngEncoder::Options& options); 59 bool writeInfo(const SkImageInfo& srcInfo); 60 void chooseProc(const SkImageInfo& srcInfo); 101 bool SkPngEncoderMgr::setHeader(const SkImageInfo& srcInfo, const SkPngEncoder::Options& options) { in setHeader() argument 109 switch (srcInfo.colorType()) { in setHeader() 118 pngColorType = srcInfo.isOpaque() ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGB_ALPHA; in setHeader() 125 SkASSERT(srcInfo.isOpaque()); in setHeader() 133 pngColorType = srcInfo.isOpaque() ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGB_ALPHA; in setHeader() 134 fPngBytesPerPixel = srcInfo.isOpaque() ? 3 : 4; in setHeader() 142 SkASSERT(srcInfo.isOpaque()); in setHeader() [all …]
|
D | SkJpegEncoder.cpp | 39 bool setParams(const SkImageInfo& srcInfo, const SkJpegEncoder::Options& options); 69 bool SkJpegEncoderMgr::setParams(const SkImageInfo& srcInfo, const SkJpegEncoder::Options& options) in setParams() argument 72 if (kUnpremul_SkAlphaType == srcInfo.alphaType() && in setParams() 81 switch (srcInfo.colorType()) { in setParams() 107 SkASSERT(srcInfo.isOpaque()); in setParams() 112 if (kUnpremul_SkAlphaType == srcInfo.alphaType() && in setParams() 125 fCInfo.image_width = srcInfo.width(); in setParams() 126 fCInfo.image_height = srcInfo.height(); in setParams() 131 if (kGray_8_SkColorType != srcInfo.colorType()) { in setParams()
|
/third_party/flutter/skia/src/gpu/ |
D | GrSurfaceContext.cpp | 255 auto srcInfo = origSrcInfo; in writePixels() local 256 if (!srcInfo.clip(this->width(), this->height(), &pt, &src, rowBytes)) { in writePixels() 260 tightRowBytes = srcInfo.minRowBytes(); in writePixels() 263 srcInfo.alphaType() == kUnpremul_SkAlphaType; in writePixels() 265 srcInfo.alphaType() == kPremul_SkAlphaType; in writePixels() 268 srcInfo.colorSpace(), this->colorSpaceInfo().colorSpace()); in writePixels() 278 (srcInfo.colorType() == GrColorType::kRGBA_8888 || in writePixels() 279 srcInfo.colorType() == GrColorType::kBGRA_8888) && in writePixels() 288 desc.fWidth = srcInfo.width(); in writePixels() 289 desc.fHeight = srcInfo.height(); in writePixels() [all …]
|
D | GrDataUtils.cpp | 492 const GrPixelInfo& srcInfo, const void* src, size_t srcRB, in GrConvertPixels() argument 495 if (!srcInfo.isValid() || !dstInfo.isValid()) { in GrConvertPixels() 501 if (dstInfo.width() != srcInfo.width() || srcInfo.height() != dstInfo.height()) { in GrConvertPixels() 508 if (dstRB < dstInfo.minRowBytes() || srcRB < srcInfo.minRowBytes()) { in GrConvertPixels() 512 size_t srcBpp = srcInfo.bpp(); in GrConvertPixels() 519 bool premul = srcInfo.alphaType() == kUnpremul_SkAlphaType && in GrConvertPixels() 521 bool unpremul = srcInfo.alphaType() == kPremul_SkAlphaType && in GrConvertPixels() 524 premul || unpremul || !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.colorSpace()); in GrConvertPixels() 526 if (srcInfo.colorType() == dstInfo.colorType() && !alphaOrCSConversion) { in GrConvertPixels() 536 SkRectMemcpy(dst, dstRB, src, srcRB, tightRB, srcInfo.height()); in GrConvertPixels() [all …]
|
/third_party/skia/tests/ |
D | ReadPixelsTest.cpp | 321 const SkImageInfo& srcInfo) { in read_should_succeed() argument 322 return SkIRect::Intersects(srcRect, DEV_RECT) && SkImageInfoValidConversion(dstInfo, srcInfo); in read_should_succeed() 434 const SkImageInfo& srcInfo) { in test_conversion() argument 435 if (!SkImageInfoIsValid(srcInfo)) { in test_conversion() 439 const void* srcPixels = five_reference_pixels(srcInfo.colorType()); in test_conversion() 440 SkPixmap srcPixmap(srcInfo, srcPixels, srcInfo.minRowBytes()); in test_conversion() 448 REPORTER_ASSERT(r, success == SkImageInfoValidConversion(dstInfo, srcInfo)); in test_conversion() 451 if (kGray_8_SkColorType == srcInfo.colorType() && in test_conversion() 458 kGray_8_SkColorType != srcInfo.colorType()) { in test_conversion() 463 if (kAlpha_8_SkColorType == srcInfo.colorType() && in test_conversion()
|
D | TransferPixelsTest.cpp | 43 GrImageInfo srcInfo(GrColorType::kRGBA_8888, kUnpremul_SkAlphaType, nullptr, 1, 1); in fill_transfer_data() local 46 GrPixmap(srcInfo, &srcPixel, 4)); in fill_transfer_data() 212 GrImageInfo srcInfo(allowedSrc.fColorType, kUnpremul_SkAlphaType, nullptr, tex->dimensions()); in basic_transfer_to_test() local 214 ComparePixels(GrCPixmap(srcInfo, srcData.get(), srcRowBytes), in basic_transfer_to_test() 276 ComparePixels(GrCPixmap(srcInfo, srcData.get(), srcRowBytes), in basic_transfer_to_test()
|
D | WritePixelsTest.cpp | 179 bool write_should_succeed(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo, bool isGPU) { in write_should_succeed() argument 180 if (!SkImageInfoValidConversion(dstInfo, srcInfo)) { in write_should_succeed() 187 if (srcInfo.alphaType() == kPremul_SkAlphaType && in write_should_succeed() 191 if (!SkColorTypeIsAlwaysOpaque(srcInfo.colorType()) && in write_should_succeed() 196 if (SkColorTypeIsAlwaysOpaque(srcInfo.colorType()) && in write_should_succeed()
|
D | TestUtils.cpp | 216 GrImageInfo srcInfo(GrColorType::kRGBA_F32, in CheckSolidPixels() local 220 GrCPixmap srcPixmap(srcInfo, col.vec(), floatBpp); in CheckSolidPixels() 222 srcInfo.makeAlphaType(pixmap.alphaType()).makeColorSpace(pixmap.refColorSpace()); in CheckSolidPixels()
|
/third_party/flutter/skia/docs/examples/ |
D | Bitmap_readPixels.cpp | 9 SkImageInfo srcInfo = SkImageInfo::MakeN32Premul(width, height); in draw() local 16 bitmap.allocPixels(srcInfo); in draw() 20 SkImageInfo dstInfo = srcInfo.makeColorType(kARGB_4444_SkColorType); in draw()
|
D | Pixmap_readPixels.cpp | 11 SkImageInfo srcInfo = SkImageInfo::MakeN32Premul(width, height); in draw() local 12 SkPixmap srcPixmap(srcInfo, (const void*) &pixels.front(), width * 4); in draw() 25 SkImageInfo dstInfo = srcInfo.makeColorType(kARGB_4444_SkColorType); in draw()
|
/third_party/skia/src/gpu/ |
D | GrColorSpaceXform.cpp | 23 sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(const GrColorInfo& srcInfo, in Make() argument 25 return Make(srcInfo.colorSpace(), srcInfo.alphaType(), in Make() 143 const GrColorInfo& srcInfo, in Make() argument 145 return Make(std::move(child), GrColorSpaceXform::Make(srcInfo, dstInfo)); in Make()
|
D | GrColorSpaceXform.h | 29 static sk_sp<GrColorSpaceXform> Make(const GrColorInfo& srcInfo, const GrColorInfo& dstInfo); 73 const GrColorInfo& srcInfo,
|
/third_party/skia/docs/examples/ |
D | Bitmap_readPixels.cpp | 9 SkImageInfo srcInfo = SkImageInfo::MakeN32Premul(width, height); in draw() local 16 bitmap.allocPixels(srcInfo); in draw() 20 SkImageInfo dstInfo = srcInfo.makeColorType(kARGB_4444_SkColorType); in draw()
|
D | Pixmap_readPixels.cpp | 11 SkImageInfo srcInfo = SkImageInfo::MakeN32Premul(width, height); in draw() local 12 SkPixmap srcPixmap(srcInfo, (const void*) &pixels.front(), width * 4); in draw() 25 SkImageInfo dstInfo = srcInfo.makeColorType(kARGB_4444_SkColorType); in draw()
|
/third_party/flutter/skia/tests/ |
D | ReadPixelsTest.cpp | 356 const SkImageInfo& srcInfo) { in read_should_succeed() argument 357 return SkIRect::Intersects(srcRect, DEV_RECT) && SkImageInfoValidConversion(dstInfo, srcInfo); in read_should_succeed() 542 const SkImageInfo& srcInfo) { in test_conversion() argument 543 if (!SkImageInfoIsValid(srcInfo)) { in test_conversion() 547 const void* srcPixels = five_reference_pixels(srcInfo.colorType()); in test_conversion() 548 SkPixmap srcPixmap(srcInfo, srcPixels, srcInfo.minRowBytes()); in test_conversion() 556 REPORTER_ASSERT(r, success == SkImageInfoValidConversion(dstInfo, srcInfo)); in test_conversion() 559 if (kGray_8_SkColorType == srcInfo.colorType() && in test_conversion() 566 kGray_8_SkColorType != srcInfo.colorType()) { in test_conversion() 571 if (kAlpha_8_SkColorType == srcInfo.colorType() && in test_conversion()
|
D | TransferPixelsTest.cpp | 41 GrPixelInfo srcInfo(GrColorType::kRGBA_8888, kUnpremul_SkAlphaType, nullptr, 1, 1); in fill_transfer_data() local 43 GrConvertPixels(dstInfo, dstLocation(i, j), dstBpp, srcInfo, &srcPixel, 4); in fill_transfer_data() 195 GrPixelInfo srcInfo(allowedSrc.fColorType, kUnpremul_SkAlphaType, nullptr, tex->width(), in basic_transfer_to_test() local 198 compare_pixels(srcInfo, srcData.get(), srcRowBytes, dstInfo, dstBuffer.get(), dstRowBytes, in basic_transfer_to_test() 248 compare_pixels(srcInfo, srcData.get(), srcRowBytes, dstInfo, dstBuffer.get(), dstRowBytes, in basic_transfer_to_test()
|
D | WritePixelsTest.cpp | 179 bool write_should_succeed(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo, bool isGPU) { in write_should_succeed() argument 180 if (!SkImageInfoValidConversion(dstInfo, srcInfo)) { in write_should_succeed() 187 if (srcInfo.alphaType() == kPremul_SkAlphaType && in write_should_succeed() 191 if (!SkColorTypeIsAlwaysOpaque(srcInfo.colorType()) && in write_should_succeed() 196 if (SkColorTypeIsAlwaysOpaque(srcInfo.colorType()) && in write_should_succeed()
|
D | BitmapCopyTest.cpp | 168 const SkImageInfo srcInfo = SkImageInfo::MakeN32Premul(W, H); in DEF_TEST() local 172 srcBM.installPixels(srcInfo, srcPixels, rowBytes); in DEF_TEST()
|
/third_party/flutter/skia/src/gpu/dawn/ |
D | GrDawnTexture.cpp | 143 SkImageInfo srcInfo; in upload() local 146 srcInfo = SkImageInfo::Make(width, height, colorType, kOpaque_SkAlphaType); in upload() 147 SkPixmap srcPixmap(srcInfo, texels[i].fPixels, origRowBytes); in upload()
|
/third_party/flutter/skia/src/utils/ |
D | SkPatchUtils.cpp | 220 SkImageInfo srcInfo = SkImageInfo::Make(count, 1, kBGRA_8888_SkColorType, in skcolor_to_float() local 224 SkConvertPixels(dstInfo, dst, 0, srcInfo, src, 0); in skcolor_to_float() 228 SkImageInfo srcInfo = SkImageInfo::Make(count, 1, kRGBA_F32_SkColorType, in float_to_skcolor() local 232 SkConvertPixels(dstInfo, dst, 0, srcInfo, src, 0); in float_to_skcolor()
|
/third_party/skia/src/utils/ |
D | SkPatchUtils.cpp | 222 SkImageInfo srcInfo = SkImageInfo::Make(count, 1, kBGRA_8888_SkColorType, in skcolor_to_float() local 226 SkAssertResult(SkConvertPixels(dstInfo, dst, 0, srcInfo, src, 0)); in skcolor_to_float() 230 SkImageInfo srcInfo = SkImageInfo::Make(count, 1, kRGBA_F32_SkColorType, in float_to_skcolor() local 234 SkAssertResult(SkConvertPixels(dstInfo, dst, 0, srcInfo, src, 0)); in float_to_skcolor()
|