Home
last modified time | relevance | path

Searched refs:alphaType (Results 1 - 25 of 181) sorted by relevance

12345678

/third_party/skia/src/core/
H A DSkImageInfo.cpp85 desc += split + "\t fAlphaType: " + std::to_string(static_cast<int>(fColorInfo.alphaType())) + "\n"; in dump()
94 SkASSERT(SkAlphaTypeIsValid(this->alphaType())); in validate()
98 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType, in SkColorTypeValidateAlphaType() argument
102 alphaType = kUnknown_SkAlphaType; in SkColorTypeValidateAlphaType()
107 if (kUnpremul_SkAlphaType == alphaType) { in SkColorTypeValidateAlphaType()
108 alphaType = kPremul_SkAlphaType; in SkColorTypeValidateAlphaType()
121 if (kUnknown_SkAlphaType == alphaType) { in SkColorTypeValidateAlphaType()
133 alphaType = kOpaque_SkAlphaType; in SkColorTypeValidateAlphaType()
137 *canonical = alphaType; in SkColorTypeValidateAlphaType()
/third_party/skia/gm/
H A Dencode_color_types.cpp24 static sk_sp<SkImage> make_image(SkColorType colorType, SkAlphaType alphaType) { in make_image() argument
28 if (alphaType != kOpaque_SkAlphaType) { in make_image()
37 if (alphaType != kOpaque_SkAlphaType) { in make_image()
43 resource = (kOpaque_SkAlphaType == alphaType) ? "images/color_wheel.jpg" in make_image()
54 colorType, alphaType, image->refColorSpace())); in make_image()
130 for (SkAlphaType alphaType : alphaTypes) {
131 auto src = make_image(colorType, alphaType);
H A Dencode_srgb.cpp35 static void make(SkBitmap* bitmap, SkColorType colorType, SkAlphaType alphaType, in make() argument
41 alphaType = kOpaque_SkAlphaType; in make()
45 alphaType = kOpaque_SkAlphaType; in make()
48 resource = (kOpaque_SkAlphaType == alphaType) ? "images/color_wheel.jpg" in make()
59 .makeAlphaType(alphaType) in make()
130 for (SkAlphaType alphaType : alphaTypes) {
133 make(&bitmap, colorType, alphaType, colorSpace);
H A Dall_bitmap_configs.cpp194 static uint32_t make_pixel(int x, int y, SkAlphaType alphaType) { in make_pixel() argument
207 switch (alphaType) { in make_pixel()
222 SkAlphaType alphaType, in make_color_test_bitmap_variant()
227 SkASSERT(alphaType == kPremul_SkAlphaType || alphaType == kUnpremul_SkAlphaType); in make_color_test_bitmap_variant()
229 SkImageInfo::Make(SCALE, SCALE, colorType, alphaType, colorSpace)); in make_color_test_bitmap_variant()
233 *pm.writable_addr32(x, y) = make_pixel(x, y, alphaType); in make_color_test_bitmap_variant()
247 for (auto alphaType : {kPremul_SkAlphaType, kUnpremul_SkAlphaType}) { in DEF_SIMPLE_GM()
251 make_color_test_bitmap_variant(colorType, alphaType, colorSpace, &bm); in DEF_SIMPLE_GM()
220 make_color_test_bitmap_variant( SkColorType colorType, SkAlphaType alphaType, sk_sp<SkColorSpace> colorSpace, SkBitmap* bm) make_color_test_bitmap_variant() argument
/third_party/skia/src/gpu/effects/
H A DGrBicubicEffect.cpp115 SkAlphaType alphaType, in Make()
119 auto fp = GrTextureEffect::Make(std::move(view), alphaType, SkMatrix::I()); in Make()
120 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in Make()
126 SkAlphaType alphaType, in Make()
135 fp = GrTextureEffect::Make(std::move(view), alphaType, SkMatrix::I(), sampler, caps); in Make()
136 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in Make()
143 SkAlphaType alphaType, in MakeSubset()
154 std::move(view), alphaType, SkMatrix::I(), sampler, subset, caps); in MakeSubset()
155 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in MakeSubset()
162 SkAlphaType alphaType, in MakeSubset()
114 Make(GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, SkImage::CubicResampler kernel, Direction direction) Make() argument
125 Make(GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, const GrSamplerState::WrapMode wrapX, const GrSamplerState::WrapMode wrapY, SkImage::CubicResampler kernel, Direction direction, const GrCaps& caps) Make() argument
141 MakeSubset( GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, const GrSamplerState::WrapMode wrapX, const GrSamplerState::WrapMode wrapY, const SkRect& subset, SkImage::CubicResampler kernel, Direction direction, const GrCaps& caps) MakeSubset() argument
160 MakeSubset( GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, const GrSamplerState::WrapMode wrapX, const GrSamplerState::WrapMode wrapY, const SkRect& subset, const SkRect& domain, SkImage::CubicResampler kernel, Direction direction, const GrCaps& caps) MakeSubset() argument
188 Make(std::unique_ptr<GrFragmentProcessor> fp, SkAlphaType alphaType, const SkMatrix& matrix, SkImage::CubicResampler kernel, Direction direction) Make() argument
[all...]
H A DGrTextureEffect.cpp155 SkAlphaType alphaType, in Make()
161 alphaType, in Make()
167 SkAlphaType alphaType, in Make()
180 alphaType, in Make()
186 SkAlphaType alphaType, in MakeSubset()
201 alphaType, in MakeSubset()
207 SkAlphaType alphaType, in MakeSubset()
216 alphaType, in MakeSubset()
223 SkAlphaType alphaType, in MakeCustomLinearFilterInset()
235 alphaType, in MakeCustomLinearFilterInset()
154 Make(GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, Filter filter, MipmapMode mm) Make() argument
166 Make(GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, GrSamplerState sampler, const GrCaps& caps, const float border[4]) Make() argument
185 MakeSubset(GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, GrSamplerState sampler, const SkRect& subset, const GrCaps& caps, const float border[4], bool alwaysUseShaderTileMode) MakeSubset() argument
206 MakeSubset(GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, GrSamplerState sampler, const SkRect& subset, const SkRect& domain, const GrCaps& caps, const float border[4]) MakeSubset() argument
221 MakeCustomLinearFilterInset( GrSurfaceProxyView view, SkAlphaType alphaType, const SkMatrix& matrix, Wrap wx, Wrap wy, const SkRect& subset, const SkRect* domain, SkVector inset, const GrCaps& caps, const float border[4]) MakeCustomLinearFilterInset() argument
764 GrTextureEffect(GrSurfaceProxyView view, SkAlphaType alphaType, const Sampling& sampling) GrTextureEffect() argument
[all...]
/third_party/skia/tools/flags/
H A DCommonFlagsConfig.cpp360 SkAlphaType* alphaType) { in parse_option_gpu_color()
362 *alphaType = kPremul_SkAlphaType; in parse_option_gpu_color()
374 *alphaType = kOpaque_SkAlphaType; in parse_option_gpu_color()
435 SkAlphaType* alphaType, in get_option_gpu_color()
441 return parse_option_gpu_color(*optionValue, outColorType, alphaType); in get_option_gpu_color()
523 SkAlphaType alphaType, in SkCommandLineConfigGpu()
538 , fAlphaType(alphaType) in SkCommandLineConfigGpu()
566 SkAlphaType alphaType = kPremul_SkAlphaType; in parse_command_line_config_gpu() local
588 extendedOptions.get_option_gpu_color("color", &colorType, &alphaType) && in parse_command_line_config_gpu()
618 alphaType, in parse_command_line_config_gpu()
358 parse_option_gpu_color(const SkString& value, SkColorType* outColorType, SkAlphaType* alphaType) parse_option_gpu_color() argument
433 get_option_gpu_color(const char* optionKey, SkColorType* outColorType, SkAlphaType* alphaType, bool optional = true) const get_option_gpu_color() argument
516 SkCommandLineConfigGpu(const SkString& tag, const SkTArray<SkString>& viaParts, ContextType contextType, bool fakeGLESVersion2, uint32_t surfaceFlags, int samples, SkColorType colorType, SkAlphaType alphaType, bool useStencilBuffers, bool testThreading, int testPersistentCache, bool testPrecompile, bool useDDLSink, bool OOPRish, bool reducedShaders, SurfType surfType) SkCommandLineConfigGpu() argument
638 SkAlphaType alphaType = kPremul_SkAlphaType; parse_command_line_config_graphite() local
[all...]
/third_party/skia/tools/gpu/
H A DBackendTextureImageFactory.cpp34 pixmap.alphaType(), in MakeBackendTextureImage()
46 if (info.alphaType() == kOpaque_SkAlphaType) { in MakeBackendTextureImage()
48 } else if (info.alphaType() == kPremul_SkAlphaType) { in MakeBackendTextureImage()
67 info.alphaType(), in MakeBackendTextureImage()
/third_party/skia/src/gpu/
H A DGrRecordingContextPriv.cpp92 if (info.alphaType() == kPremul_SkAlphaType || in makeSC()
93 info.alphaType() == kOpaque_SkAlphaType) { in makeSC()
161 if (info.alphaType() == kPremul_SkAlphaType || info.alphaType() == kOpaque_SkAlphaType) { in makeSFC()
205 SkAlphaType alphaType, in makeSFC()
222 if (alphaType == kPremul_SkAlphaType || alphaType == kOpaque_SkAlphaType) { in makeSFC()
249 GrImageInfo info(GrColorType::kUnknown, alphaType, std::move(colorSpace), dimensions); in makeSFC()
274 if (info.alphaType() == kPremul_SkAlphaType || info.alphaType() in makeSFCWithFallback()
204 makeSFC( SkAlphaType alphaType, sk_sp<SkColorSpace> colorSpace, SkISize dimensions, SkBackingFit fit, const GrBackendFormat& format, int sampleCount, GrMipmapped mipmapped, GrProtected isProtected, GrSwizzle readSwizzle, GrSwizzle writeSwizzle, GrSurfaceOrigin origin, SkBudgeted budgeted) makeSFC() argument
[all...]
H A DGrImageInfo.h48 return {this->colorType(), this->alphaType(), std::move(cs), this->width(), this->height()}; in makeColorSpace()
52 return {this->colorType(), this->alphaType(), this->refColorSpace(), dimensions}; in makeDimensions()
56 return {this->colorType(), this->alphaType(), this->refColorSpace(), width, height}; in makeWH()
63 SkAlphaType alphaType() const { return fColorInfo.alphaType(); } in alphaType() function in GrImageInfo
H A DGrColorInfo.cpp13 GrColorType colorType, SkAlphaType alphaType, sk_sp<SkColorSpace> colorSpace) in GrColorInfo()
14 : fColorSpace(std::move(colorSpace)), fColorType(colorType), fAlphaType(alphaType) { in GrColorInfo()
22 ci.alphaType(), in GrColorInfo()
12 GrColorInfo( GrColorType colorType, SkAlphaType alphaType, sk_sp<SkColorSpace> colorSpace) GrColorInfo() argument
H A DSurfaceContext.cpp87 if (!alpha_types_compatible(this->colorInfo().alphaType(), dst.alphaType())) { in readPixels()
147 SkAlphaType alphaType = canvas2DFastPath ? dst.alphaType() in readPixels() local
148 : this->colorInfo().alphaType(); in readPixels()
150 alphaType, in readPixels()
161 this->readSurfaceView(), this->colorInfo().alphaType())); in readPixels()
169 fp = GrTextureEffect::Make(this->readSurfaceView(), this->colorInfo().alphaType()); in readPixels()
232 this->colorInfo().alphaType(), in readPixels()
349 if (!alpha_types_compatible(src[0].alphaType(), thi in internalWritePixels()
[all...]
/third_party/skia/docs/examples/
H A DImage_alphaType.cpp9 SkAlphaType alphaType = image->alphaType(); in REG_FIDDLE() local
11 canvas->drawString(alphaTypeStr[(int) alphaType], 20, image->height() + 20, SkPaint()); in REG_FIDDLE()
H A DImageInfo_empty_constructor.cpp12 const char* alphaType[] = { "Unknown", "Opaque", "Premul", "Unpremul" }; in REG_FIDDLE() local
14 string.printf("k%s_SkAlphaType", alphaType[(int) imageInfo.alphaType()]); in REG_FIDDLE()
H A DBitmap_setAlphaType.cpp25 for (SkAlphaType alphaType : alphaTypes) { in REG_FIDDLE()
27 bool result = bitmap.setAlphaType(alphaType); in REG_FIDDLE()
28 SkDebugf("%s %s ", result ? "true " : "false", alphas[(int) bitmap.alphaType()]); in REG_FIDDLE()
H A DColorTypeValidateAlphaType.cpp17 canvas->drawString(" colorType alphaType canonical", 10, y, font, paint); in REG_FIDDLE()
24 for (SkAlphaType alphaType : alphaTypes) { in REG_FIDDLE()
26 bool result = SkColorTypeValidateAlphaType(colorType, alphaType, &canonicalAlphaType); in REG_FIDDLE()
28 string.printf("%13s %10s %10s", colors[(int) colorType], alphas[(int) alphaType], in REG_FIDDLE()
H A Dunexpected_setAlphaType.cpp58 for (SkAlphaType alphaType : kAlphaTypes) { in REG_FIDDLE()
60 bool result = bitmap.setAlphaType(alphaType); in REG_FIDDLE()
62 alphatype_name(bitmap.alphaType())); in REG_FIDDLE()
H A DCanvas_readPixels_b.cpp8 for (SkAlphaType alphaType : { kPremul_SkAlphaType, kUnpremul_SkAlphaType } ) { in REG_FIDDLE()
10 SkImageInfo info = SkImageInfo::Make(1, 1, kBGRA_8888_SkColorType, alphaType); in REG_FIDDLE()
/third_party/skia/src/ports/
H A DSkImageGeneratorCG.cpp84 SkAlphaType alphaType = hasAlpha ? kPremul_SkAlphaType : kOpaque_SkAlphaType; in MakeFromEncodedCG() local
85 SkImageInfo info = SkImageInfo::MakeS32(width, height, alphaType); in MakeFromEncodedCG()
127 switch (info.alphaType()) { in onGetPixels()
129 if (kOpaque_SkAlphaType != this->getInfo().alphaType()) { in onGetPixels()
H A DSkImageGeneratorWIC.cpp108 SkAlphaType alphaType = kPremul_SkAlphaType; in MakeFromEncodedWIC() local
146 alphaType = kOpaque_SkAlphaType; in MakeFromEncodedWIC()
151 SkImageInfo info = SkImageInfo::MakeS32(width, height, alphaType); in MakeFromEncodedWIC()
183 if (kUnpremul_SkAlphaType == info.alphaType()) { in onGetPixels()
/third_party/skia/bench/
H A DCodecBench.cpp20 SkAlphaType alphaType) in CodecBench()
22 , fAlphaType(alphaType) in CodecBench()
27 alpha_type_to_str(alphaType)); in CodecBench()
19 CodecBench(SkString baseName, SkData* encoded, SkColorType colorType, SkAlphaType alphaType) CodecBench() argument
H A DCodecBenchPriv.h28 inline const char* alpha_type_to_str(SkAlphaType alphaType) { in alpha_type_to_str() argument
29 switch (alphaType) { in alpha_type_to_str()
/third_party/skia/src/images/
H A DSkPngEncoder.cpp145 if (kUnpremul_SkAlphaType == srcInfo.alphaType()) { in setHeader()
246 switch (info.alphaType()) { in choose_proc()
258 switch (info.alphaType()) { in choose_proc()
274 switch (info.alphaType()) { in choose_proc()
288 switch (info.alphaType()) { in choose_proc()
299 switch (info.alphaType()) { in choose_proc()
310 switch (info.alphaType()) { in choose_proc()
321 switch (info.alphaType()) { in choose_proc()
386 kOpaque_SkAlphaType == srcInfo.alphaType()) in writeInfo()
/third_party/skia/src/utils/mac/
H A DSkCreateCGImageRef.cpp90 if (!get_bitmap_info(bm.colorType(), bm.alphaType(), bitsPerComponent, info, &upscaleTo32)) { in prepare_for_image_ref()
160 cg_bitmap_info = compute_cgalpha_info_rgba(pmap.alphaType()); in SkCreateCGContext()
164 cg_bitmap_info = compute_cgalpha_info_bgra(pmap.alphaType()); in SkCreateCGContext()
184 cg_bitmap_info = compute_cgalpha_info_rgba(info.alphaType()); in SkCopyPixelsFromCGImage()
188 cg_bitmap_info = compute_cgalpha_info_bgra(info.alphaType()); in SkCopyPixelsFromCGImage()
/third_party/skia/include/core/
H A DSkImageInfo.h124 there is more than one valid canonical SkAlphaType, set to alphaType, if valid.
127 Returns false only if alphaType is kUnknown_SkAlphaType, color type is not
134 SK_API bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType,
209 SkAlphaType alphaType() const { return fAlphaType; } in alphaType() function in SkColorInfo
241 return SkColorInfo(newColorType, this->alphaType(), this->refColorSpace()); in makeColorType()
248 return SkColorInfo(this->colorType(), this->alphaType(), std::move(cs)); in makeColorSpace()
464 SkAlphaType alphaType() const { return fColorInfo.alphaType(); } in alphaType() function

Completed in 19 milliseconds

12345678