39 auto caps = context->priv().caps();
40 auto recorder = context->makeRecorder();
48 auto texture1 = recorder->createBackendTexture(
kSize,
info);
53 auto texture1Copy = texture1;
57 auto texture2 = recorder->createBackendTexture(
kSize,
info);
63 texture1Copy = texture2;
70 texture1Copy = invalidTexture;
73 texture1Copy = texture1;
77 recorder->deleteBackendTexture(texture1);
78 recorder->deleteBackendTexture(texture2);
81 texture1 = recorder->createBackendTexture(
kSize,
info);
82 context->deleteBackendTexture(texture1);
84 auto recorder2 = context->makeRecorder();
85 texture1 = recorder->createBackendTexture(
kSize,
info);
86 recorder2->deleteBackendTexture(texture1);
102 auto caps = context->priv().caps();
103 std::unique_ptr<Recorder> recorder = context->makeRecorder();
131 recorder->deleteBackendTexture(
texture);
148 recorder->deleteBackendTexture(
texture);
164 const Caps* caps = context->priv().caps();
165 std::unique_ptr<Recorder> recorder = context->makeRecorder();
197 recorder->deleteBackendTexture(
texture);
229 texture.setMutableState(newState);
DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(BackendTextureTest, reporter, context, CtsEnforcement::kNextRelease)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
#define REPORTER_ASSERT(r, cond,...)
#define DEF_GRAPHITE_TEST_FOR_VULKAN_CONTEXT(name, reporter, graphite_context, ctsEnforcement)
void reset(T *ptr=nullptr)
virtual TextureInfo getDefaultSampledTextureInfo(SkColorType, Mipmapped mipmapped, Protected, Renderable) const =0
SK_API sk_sp< SkImage > WrapTexture(skgpu::graphite::Recorder *, const skgpu::graphite::BackendTexture &, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace, skgpu::Origin origin, GenerateMipmapsFromBase generateMipmapsFromBase, TextureReleaseProc=nullptr, ReleaseContext=nullptr, std::string_view label={})
sk_sp< const SkImage > image
SK_API sk_sp< SkSurface > WrapBackendTexture(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, int sampleCnt, SkColorType colorType, sk_sp< SkColorSpace > colorSpace, const SkSurfaceProps *surfaceProps, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
SK_API MutableTextureState MakeVulkan(VkImageLayout layout, uint32_t queueFamilyIndex)
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_GENERAL
@ VK_SHARING_MODE_EXCLUSIVE
@ VK_IMAGE_TILING_OPTIMAL
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_FORMAT_R8G8B8A8_UNORM