599 {
600 using namespace skgpu;
601
603 const GrCaps* caps = context->priv().caps();
604
606
607 constexpr SkColor4f kTransCol { 0, 0.25f, 0.75f, 0.5f };
608 constexpr SkColor4f kGrayCol { 0.75f, 0.75f, 0.75f, 0.75f };
609
610 struct {
613 } combinations[] = {
620
622
625
642 };
643
645
646 for (auto combo : combinations) {
648
650
652 continue;
653 }
654 }
655
657
658
659 continue;
660 }
661
664 continue;
665 }
666
670 continue;
671 }
672
675
676 continue;
677 }
678 }
679
680 {
684 auto mbet = ManagedBackendTexture::MakeWithoutData(dContext,
685 32, 32,
687 mipmapped,
688 renderable,
689 isProtected);
691#ifdef SK_DEBUG
692 {
694 renderable);
696 }
697#endif
698
699 return mbet;
700 };
701
704 }
705
706 {
712 32, 32,
715 mipmapped,
716 renderable,
717 isProtected);
719
720#ifdef SK_DEBUG
721 {
723 renderable);
725 }
726#endif
727
728 return mbet;
729 };
732 renderable);
733 }
734
738 int numLevels,
743 srcData,
744 numLevels,
745 origin,
746 renderable,
747 isProtected);
749#ifdef SK_DEBUG
750 {
752 renderable);
754 }
755#endif
756 return mbet;
757 };
758
761 createWithSrcDataMtd,
763 origin,
764 mipmapped,
765 renderable);
766 }
767 }
768 }
769 }
770}
void check_vk_tiling(const GrBackendTexture &backendTex)
void test_color_init(GrDirectContext *dContext, skiatest::Reporter *reporter, const std::function< sk_sp< ManagedBackendTexture >(GrDirectContext *, const SkColor4f &, skgpu::Mipmapped, GrRenderable)> &create, GrColorType colorType, const SkColor4f &color, skgpu::Mipmapped mipmapped, GrRenderable renderable)
void test_pixmap_init(GrDirectContext *dContext, skiatest::Reporter *reporter, const std::function< sk_sp< ManagedBackendTexture >(GrDirectContext *, const SkPixmap srcData[], int numLevels, GrSurfaceOrigin, GrRenderable)> &create, SkColorType skColorType, GrSurfaceOrigin origin, skgpu::Mipmapped mipmapped, GrRenderable renderable)
void test_wrapping(GrDirectContext *dContext, skiatest::Reporter *reporter, const std::function< sk_sp< ManagedBackendTexture >(GrDirectContext *, skgpu::Mipmapped, GrRenderable)> &create, GrColorType grColorType, skgpu::Mipmapped mipmapped, GrRenderable renderable)
static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct)
@ kBottomLeft_GrSurfaceOrigin
skgpu::Protected Protected
@ kR16G16B16A16_unorm_SkColorType
pixel with a little endian uint16_t for red, green, blue
@ kRGBA_10x6_SkColorType
pixel with 10 used bits (most significant) followed by 6 unused
@ kBGR_101010x_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kR8G8_unorm_SkColorType
pixel with a uint8_t for red and green
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kA16_unorm_SkColorType
pixel with a little endian uint16_t for alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kRGB_101010x_SkColorType
pixel with 10 bits each for red, green, blue; in 32-bit word
@ kLastEnum_SkColorType
last valid value
@ kSRGBA_8888_SkColorType
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kBGRA_10101010_XR_SkColorType
pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range
@ kRGB_888x_SkColorType
pixel with 8 bits each for red, green, blue; in 32-bit word
@ kBGRA_1010102_SkColorType
10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
@ kA16_float_SkColorType
pixel with a half float for alpha
@ kRGBA_F32_SkColorType
pixel using C float for red, green, blue, alpha; in 128-bit word
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
@ kBGR_101010x_XR_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
@ kR16G16_unorm_SkColorType
pixel with a little endian uint16_t for red and green
@ kRGBA_F16Norm_SkColorType
pixel with half floats in [0,1] for red, green, blue, alpha;
@ kR16G16_float_SkColorType
pixel with a half float for red and green
bool mipmapSupport() const
bool supportsProtectedContent() const
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
SK_API GrBackendFormat defaultBackendFormat(SkColorType, GrRenderable) const
GrDirectContext * directContext() const
uint32_t uint32_t * format
constexpr SkColor4f kLtGray
constexpr SkColor4f kGreen
constexpr SkColor4f kCyan
constexpr SkColor4f kGray
constexpr SkColor4f kBlue
constexpr SkColor4f kYellow
SK_API sk_sp< SkPixelRef > MakeWithData(const SkImageInfo &, size_t rowBytes, sk_sp< SkData > data)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size