45 using namespace skgpu;
47 auto dContext = ctxInfo.directContext();
49 const GrVkCaps* vkCaps =
static_cast<const GrVkCaps*
>(dContext->priv().caps());
57 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(
106 using namespace skgpu;
108 auto dContext = ctxInfo.directContext();
110 Protected isProtected =
Protected(dContext->priv().caps()->supportsProtectedContent());
112 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(
148 sk_gpu_test::ManagedBackendTexture::ReleaseProc,
149 mbet->releaseContext());
196 backendTex2 = invalidTexture;
200 invalidTexture = backendTex1;
204 invalidTexture =
static_cast<decltype(invalidTexture)&
>(invalidTexture);
216 auto dContext = ctxInfo.directContext();
217 GrGpu* gpu = dContext->priv().getGpu();
263 dContext->deleteBackendTexture(backendTex);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kTopLeft_GrSurfaceOrigin
skgpu::Protected Protected
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static bool ok(int result)
#define DEF_GANESH_TEST_FOR_VULKAN_CONTEXT(name, reporter, context_info, ctsEnforcement)
#define REPORTER_ASSERT(r, cond,...)
GrBackendFormat getBackendFormat() const
GrTextureType textureType() const
bool supportsProtectedContent() const
GrTexture * peekTexture() const
GrSurface * peekSurface() const
bool isInstantiated() const
bool supportsExternalMemory() const
bool supportsDRMFormatModifiers() const
uint32_t queueIndex() const
const GrVkCaps & vkCaps() const
VkImageLayout currentLayout() const
void updateImageLayout(VkImageLayout newLayout)
void reset(T *ptr=nullptr)
SK_API void SetVkImageLayout(GrBackendTexture *, VkImageLayout)
SK_API GrBackendTexture MakeVk(int width, int height, const GrVkImageInfo &, std::string_view label={})
SK_API bool GetVkImageInfo(const GrBackendTexture &, GrVkImageInfo *)
constexpr SkColor4f kTransparent
SK_API bool GetBackendTextureFromImage(const SkImage *img, GrBackendTexture *outTexture, bool flushPendingGrContextIO, GrSurfaceOrigin *origin=nullptr)
SK_API sk_sp< SkImage > BorrowTextureFrom(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
sk_sp< const SkImage > image
GrTextureProxy * GetTextureImageProxy(SkImage *image, GrRecordingContext *rContext)
std::tuple< GrSurfaceProxyView, GrColorType > AsView(GrRecordingContext *rContext, const SkImage *img, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy)
uint32_t fCurrentQueueFamily
VkImageLayout fImageLayout
@ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
@ VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
#define VK_QUEUE_FAMILY_EXTERNAL
@ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT