51 auto dContext = ctxInfo.directContext();
54 constexpr SkColor4f kTransCol { 0, 0.25f, 0.75f, 0.5f };
55 constexpr SkColor4f kGrayCol { 0.75f, 0.75f, 0.75f, 0.75f };
59 MTLPixelFormat fFormat;
73 { 0.25f, 0.5f, 0.75f, 1.0f } },
74#ifdef SK_BUILD_FOR_MAC
76 { 0.25f, 0.5f, 0.75f, 1.0f } },
78#ifdef SK_BUILD_FOR_IOS
100 for (
auto combo : combinations) {
112 for (
auto mipmapped : {skgpu::Mipmapped::kNo, skgpu::Mipmapped::kYes}) {
113 if (skgpu::Mipmapped::kYes == mipmapped && !mtlCaps->
mipmapSupport()) {
117 for (
auto renderable : { GrRenderable::kNo, GrRenderable::kYes }) {
119 if (GrRenderable::kYes == renderable) {
132 return ManagedBackendTexture::MakeWithoutData(dContext,
154 switch (combo.fColorType) {
173 return ManagedBackendTexture::MakeWithData(dContext,
182 combo.fColor, mipmapped, renderable);
197 return ManagedBackendTexture::MakeWithData(dContext,
207 createWithSrcDataMtd,
void test_wrapping(GrDirectContext *, skiatest::Reporter *, const std::function< sk_sp< ManagedBackendTexture >(GrDirectContext *, skgpu::Mipmapped, GrRenderable)> &create, GrColorType, skgpu::Mipmapped, GrRenderable)
void test_color_init(GrDirectContext *, skiatest::Reporter *, const std::function< sk_sp< ManagedBackendTexture >(GrDirectContext *, const SkColor4f &, skgpu::Mipmapped, GrRenderable)> &create, GrColorType, const SkColor4f &, skgpu::Mipmapped, GrRenderable)
void test_pixmap_init(GrDirectContext *, skiatest::Reporter *, const std::function< sk_sp< ManagedBackendTexture >(GrDirectContext *, const SkPixmap srcData[], int numLevels, GrSurfaceOrigin, GrRenderable)> &create, SkColorType, GrSurfaceOrigin, skgpu::Mipmapped, GrRenderable)
uint32_t uint32_t * format