35 : fFormat(
format), fYcbcrConversionInfo(ycbcrInfo) {}
39 return &fYcbcrConversionInfo;
56 size_t bytesPerBlock()
const override {
60 int stencilBits()
const override {
64 uint32_t channelMask()
const override {
75 return fFormat == otherVk->fFormat &&
76 fYcbcrConversionInfo == otherVk->fYcbcrConversionInfo;
81 std::string toString()
const override {
82#if defined(SK_DEBUG) || GR_TEST_UTILS
93 void makeTexture2D()
override {
96 if (fYcbcrConversionInfo.
isValid()) {
126 bool willUseDRMFormatModifiers) {
143 *vkFormat =
data->asVkFormat();
153 return data->getYcbcrConversionInfo();
178 return fMutableState;
199 if (fMutableState != otherVk->fMutableState) {
211 return fVkInfo.
fImage == otherVk->fVkInfo.fImage;
248 if ((
info.fYcbcrConversionInfo.isValid() &&
info.fYcbcrConversionInfo.fExternalFormat != 0) ||
268 if (
info.fImageUsageFlags == 0) {
281 std::string_view label) {
304 std::move(mutableState)));
345 return fMutableState;
371 if (fMutableState != otherVk->fMutableState) {
429 std::move(mutableState)));
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static const VkImageUsageFlags kDefaultTexRTUsageFlags
static GrVkImageInfo apply_default_usage_flags(const GrVkImageInfo &info, VkImageUsageFlags defaultFlags)
static const VkImageUsageFlags kDefaultRTUsageFlags
static const GrVkBackendFormatData * get_and_cast_data(const GrBackendFormat &format)
static GrTextureType vk_image_info_to_texture_type(const GrVkImageInfo &info)
static const VkImageUsageFlags kDefaultUsageFlags
GrVkImageInfo GrVkImageInfoWithMutableState(const GrVkImageInfo &info, const skgpu::MutableTextureState *mutableState)
static constexpr GrColorFormatDesc GrVkFormatDesc(VkFormat vkFormat)
GrBackendRenderTarget::AnyRenderTargetData AnyRenderTargetData
GrBackendApi backend() const
static GrBackendRenderTarget MakeGrBackendRenderTarget(int width, int height, int sampleCnt, int stencilBits, GrBackendApi backend, bool framebufferOnly, const RenderTargetData &data)
static GrBackendTexture MakeGrBackendTexture(int width, int height, std::string_view label, skgpu::Mipmapped mipped, GrBackendApi backend, GrTextureType texture, const TextureData &data)
static GrBackendFormat MakeGrBackendFormat(GrTextureType textureType, GrBackendApi api, const FormatData &data)
static const GrBackendFormatData * GetBackendData(const GrBackendFormat &format)
GrBackendTexture::AnyTextureData AnyTextureData
GrBackendApi backend() const
sk_sp< skgpu::MutableTextureState > getMutableState() const override
void setMutableState(const skgpu::MutableTextureState &state) override
const GrVkImageInfo & info() const
GrVkBackendRenderTargetData(const GrVkImageInfo &info, sk_sp< skgpu::MutableTextureState > mutableState=nullptr)
const skgpu::MutableTextureState * mutableState() const
skgpu::MutableTextureState * mutableState()
GrVkBackendTextureData(const GrVkImageInfo &info, sk_sp< skgpu::MutableTextureState > mutableState=nullptr)
sk_sp< skgpu::MutableTextureState > getMutableState() const override
void setMutableState(const skgpu::MutableTextureState &state) override
const skgpu::MutableTextureState * mutableState() const
const GrVkImageInfo & info() const
skgpu::MutableTextureState * mutableState()
void set(const MutableTextureState &that)
uint32_t uint32_t * format
static float max(float r, float g, float b)
SK_API bool GetVkImageInfo(const GrBackendRenderTarget &, GrVkImageInfo *)
SK_API void SetVkImageLayout(GrBackendRenderTarget *, VkImageLayout)
SK_API GrBackendRenderTarget MakeVk(int width, int height, const GrVkImageInfo &)
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 *)
void SetVkImageLayout(MutableTextureState *state, VkImageLayout layout)
SK_API MutableTextureState MakeVulkan(VkImageLayout layout, uint32_t queueFamilyIndex)
static constexpr const char * VkFormatToStr(VkFormat vkFormat)
static constexpr int VkFormatStencilBits(VkFormat format)
static constexpr size_t VkFormatBytesPerBlock(VkFormat vkFormat)
static constexpr uint32_t VkFormatChannels(VkFormat vkFormat)
uint32_t fCurrentQueueFamily
skgpu::Protected fProtected
skgpu::VulkanYcbcrConversionInfo fYcbcrConversionInfo
VkImageLayout fImageLayout
VkImageUsageFlags fImageUsageFlags
VkImageTiling fImageTiling
std::shared_ptr< const fml::Mapping > data
VkFlags VkImageUsageFlags
@ VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_TRANSFER_SRC_BIT
@ VK_FORMAT_R8G8B8A8_UNORM
@ VK_FORMAT_BC1_RGB_UNORM_BLOCK
@ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK
@ VK_FORMAT_BC1_RGBA_UNORM_BLOCK