Home
last modified time | relevance | path

Searched refs:alphaType (Results 1 – 25 of 52) sorted by relevance

123

/external/skia/src/core/
DSkImageInfo.cpp16 static bool alpha_type_is_valid(SkAlphaType alphaType) { in alpha_type_is_valid() argument
17 return (alphaType >= 0) && (alphaType <= kLastEnum_SkAlphaType); in alpha_type_is_valid()
49 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType, in SkColorTypeValidateAlphaType() argument
53 alphaType = kUnknown_SkAlphaType; in SkColorTypeValidateAlphaType()
56 if (kUnpremul_SkAlphaType == alphaType) { in SkColorTypeValidateAlphaType()
57 alphaType = kPremul_SkAlphaType; in SkColorTypeValidateAlphaType()
64 if (kUnknown_SkAlphaType == alphaType) { in SkColorTypeValidateAlphaType()
70 alphaType = kOpaque_SkAlphaType; in SkColorTypeValidateAlphaType()
76 *canonical = alphaType; in SkColorTypeValidateAlphaType()
DSkConfig8888.cpp195 dstPI.fAlphaType = dstInfo.alphaType(); in CopyPixels()
201 srcPI.fAlphaType = srcInfo.alphaType(); in CopyPixels()
218 if (srcInfo.alphaType() != dstInfo.alphaType()) { in CopyPixels()
246 if (srcInfo.alphaType() == kUnpremul_SkAlphaType) { in CopyPixels()
279 if (dstInfo.alphaType() == kUnpremul_SkAlphaType) { in CopyPixels()
DSkBitmap.cpp108 SkAlphaType newAT = info.alphaType(); in setInfo()
109 if (!SkColorTypeValidateAlphaType(info.colorType(), info.alphaType(), &newAT)) { in setInfo()
146 if (fInfo.alphaType() != newAlphaType) { in setAlphaType()
184 switch (prInfo.alphaType()) { in setPixelRef()
186 SkASSERT(fInfo.alphaType() == kUnknown_SkAlphaType); in setPixelRef()
190 SkASSERT(fInfo.alphaType() == kOpaque_SkAlphaType || in setPixelRef()
191 fInfo.alphaType() == kPremul_SkAlphaType); in setPixelRef()
194 SkASSERT(fInfo.alphaType() == kOpaque_SkAlphaType || in setPixelRef()
195 fInfo.alphaType() == kUnpremul_SkAlphaType); in setPixelRef()
734 if (255 != a && kPremul_SkAlphaType == this->alphaType()) { in internalErase()
[all …]
DSkPixelRef.cpp83 SkAlphaType newAlphaType = info.alphaType(); in validate_info()
84 SkAssertResult(SkColorTypeValidateAlphaType(info.colorType(), info.alphaType(), &newAlphaType)); in validate_info()
DSkBitmapDevice.cpp33 switch (info.alphaType()) { in valid_for_bitmap_device()
41 SkAlphaType canonicalAlphaType = info.alphaType(); in valid_for_bitmap_device()
74 SkAlphaType newAT = origInfo.alphaType(); in Create()
/external/skia/bench/
DCodecBench.cpp53 SkAlphaType alphaType; in onPreDraw() local
56 SkAssertResult(SkColorTypeValidateAlphaType(fColorType, fInfo.alphaType(), in onPreDraw()
57 &alphaType)); in onPreDraw()
58 if (alphaType != fInfo.alphaType()) { in onPreDraw()
59 fInfo = fInfo.makeAlphaType(alphaType); in onPreDraw()
Dnanobench.cpp683 SkAlphaType alphaType; in next() local
684 if (!SkColorTypeValidateAlphaType(colorType, info.alphaType(), in next()
685 &alphaType)) { in next()
688 if (alphaType != info.alphaType()) { in next()
689 info = info.makeAlphaType(alphaType); in next()
/external/skia/src/images/
DSkDecodingImageGenerator.cpp167 decoder->setRequireUnpremultipliedColors(info.alphaType() == kUnpremul_SkAlphaType); in onGetPixels()
187 SkASSERT(check_alpha(info.alphaType(), bm.alphaType())); in onGetPixels()
189 SkASSERT(check_alpha(info.alphaType(), bitmap.alphaType())); in onGetPixels()
259 if (opts.fRequireUnpremul && info.alphaType() != kOpaque_SkAlphaType) { in CreateDecodingImageGenerator()
263 SkAlphaType newAlphaType = info.alphaType(); in CreateDecodingImageGenerator()
264 if (!SkColorTypeValidateAlphaType(info.colorType(), info.alphaType(), &newAlphaType)) { in CreateDecodingImageGenerator()
DSkImageDecoder_astc.cpp124 SkAlphaType alphaType = kOpaque_SkAlphaType; in onDecode() local
126 alphaType = kUnpremul_SkAlphaType; in onDecode()
128 alphaType = kPremul_SkAlphaType; in onDecode()
132 bm->setInfo(SkImageInfo::MakeN32(sampler.scaledWidth(), sampler.scaledHeight(), alphaType)); in onDecode()
DSkImageDecoder_ktx.cpp73 SkAlphaType alphaType = kOpaque_SkAlphaType; in onDecode() local
76 alphaType = kUnpremul_SkAlphaType; in onDecode()
83 alphaType = kPremul_SkAlphaType; in onDecode()
113 bm->setInfo(SkImageInfo::MakeN32(w, h, alphaType)); in onDecode()
213 SkASSERT(bm->alphaType() == kPremul_SkAlphaType); in onDecode()
DSkImageDecoder_libwebp.cpp300 SkAlphaType alphaType = kOpaque_SkAlphaType; in setDecodeConfig() local
303 alphaType = kUnpremul_SkAlphaType; in setDecodeConfig()
305 alphaType = kPremul_SkAlphaType; in setDecodeConfig()
308 return decodedBitmap->setInfo(SkImageInfo::Make(width, height, colorType, alphaType)); in setDecodeConfig()
DSkImageDecoder_libpng.cpp336 SkAlphaType alphaType = this->getRequireUnpremultipliedColors() ? in onDecode() local
341 colorType, alphaType)); in onDecode()
973 SkAlphaType alphaType = kOpaque_SkAlphaType; in onDecodeSubset() local
976 alphaType = kUnpremul_SkAlphaType; in onDecodeSubset()
978 alphaType = kPremul_SkAlphaType; in onDecodeSubset()
981 decodedBitmap.setAlphaType(alphaType); in onDecodeSubset()
/external/skia/src/codec/
DSkCodec_libbmp.cpp27 if (src.alphaType() != dst.alphaType()) { in conversion_possible()
28 if (kOpaque_SkAlphaType == src.alphaType()) { in conversion_possible()
34 switch (dst.alphaType()) { in conversion_possible()
429 SkAlphaType alphaType = kOpaque_SkAlphaType; in ReadHeader() local
438 alphaType = kUnpremul_SkAlphaType; in ReadHeader()
447 alphaType = kUnpremul_SkAlphaType; in ReadHeader()
515 colorType, alphaType); in ReadHeader()
599 if (!createColorTable(dstInfo.alphaType(), inputColorCount)) { in onGetPixels()
626 bool SkBmpCodec::createColorTable(SkAlphaType alphaType, int* numColors) { in createColorTable() argument
657 switch (alphaType) { in createColorTable()
[all …]
DSkCodec_libpng.cpp399 if (src.alphaType() != dst.alphaType()) { in conversion_possible()
400 if (kOpaque_SkAlphaType == src.alphaType()) { in conversion_possible()
406 switch (dst.alphaType()) { in conversion_possible()
452 if (!this->decodePalette(kPremul_SkAlphaType == requestedInfo.alphaType(), bitDepth, in initializeSwizzler()
461 } else if (this->getInfo().alphaType() == kOpaque_SkAlphaType) { in initializeSwizzler()
DSkCodec_libgif.cpp227 return kPremul_SkAlphaType == dst.alphaType() || in conversion_possible()
228 kUnpremul_SkAlphaType == dst.alphaType(); in conversion_possible()
230 return kPremul_SkAlphaType == dst.alphaType() || in conversion_possible()
231 kUnpremul_SkAlphaType == dst.alphaType(); in conversion_possible()
DSkMaskSwizzler.cpp186 switch (info.alphaType()) { in CreateMaskSwizzler()
207 switch (info.alphaType()) { in CreateMaskSwizzler()
228 switch (info.alphaType()) { in CreateMaskSwizzler()
DSkCodec_libbmp.h91 bool createColorTable(SkAlphaType alphaType, int* colorCount);
/external/skia/src/utils/mac/
DSkCreateCGImageRef.cpp78 *info = ComputeCGAlphaInfo_RGBA(bm.alphaType()); in getBitmapInfo()
82 *info = ComputeCGAlphaInfo_BGRA(bm.alphaType()); in getBitmapInfo()
250 cg_bitmap_info = ComputeCGAlphaInfo_RGBA(info.alphaType()); in SkCopyPixelsFromCGImage()
254 cg_bitmap_info = ComputeCGAlphaInfo_BGRA(info.alphaType()); in SkCopyPixelsFromCGImage()
/external/skia/tests/
DKtxTest.cpp66 REPORTER_ASSERT(reporter, decodedBitmap.alphaType() == bm8888.alphaType()); in DEF_TEST()
119 REPORTER_ASSERT(reporter, decodedBitmap.alphaType() == kPremul_SkAlphaType); in DEF_TEST()
DBitmapCopyTest.cpp229 REPORTER_ASSERT(reporter, subset.alphaType() == bitmap.alphaType()); in DEF_TEST()
263 REPORTER_ASSERT(reporter, subset.alphaType() == bitmap.alphaType()); in DEF_TEST()
/external/skia/src/image/
DSkImage_Gpu.cpp87 GrPixelConfig config = SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType(), in onReadPixels()
90 if (kUnpremul_SkAlphaType == info.alphaType() && kPremul_SkAlphaType == fAlphaType) { in onReadPixels()
106 if (kPremul_SkAlphaType == info.alphaType() && kUnpremul_SkAlphaType == fAlphaType) { in onReadPixels()
/external/skia/tools/
Dsk_tool_utils.cpp55 SkColorType colorType, SkAlphaType alphaType) { in write_pixels() argument
59 const SkImageInfo info = SkImageInfo::Make(tmp.width(), tmp.height(), colorType, alphaType); in write_pixels()
/external/skia/include/core/
DSkImageInfo.h120 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType,
207 SkAlphaType alphaType() const { return fAlphaType; } in alphaType() function
DSkBitmap.h74 SkAlphaType alphaType() const { return fInfo.alphaType(); } in alphaType() function
176 return SkAlphaTypeIsOpaque(this->alphaType()); in isOpaque()
/external/skia/include/c/
Dsk_types.h62 sk_alphatype_t alphaType; member

123