8#ifndef GrVkSampler_DEFINED
9#define GrVkSampler_DEFINED
29 VkSampler
sampler()
const {
return fSampler; }
30 const VkSampler*
samplerPtr()
const {
return &fSampler; }
57 uint32_t
uniqueID()
const {
return fUniqueID; }
59#ifdef SK_TRACE_MANAGED_RESOURCES
60 void dumpInfo()
const override {
61 SkDebugf(
"GrVkSampler: %" PRIdPTR
" (%d refs)\n", (intptr_t)fSampler, this->getRefCnt());
70 , fYcbcrConversion(ycbcrConversion)
72 , fUniqueID(GenID()) {}
74 void freeGPUData()
const override;
76 static uint32_t GenID() {
77 static std::atomic<uint32_t> nextID{1};
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SK_BEGIN_REQUIRE_DENSE
#define SK_END_REQUIRE_DENSE
static constexpr uint32_t SK_InvalidUniqueID
GrVkManagedResource(const GrVkGpu *gpu)
static const Key & GetKey(const GrVkSampler &sampler)
const VkSampler * samplerPtr() const
static uint32_t Hash(const Key &key)
uint32_t uniqueID() const
VkSampler sampler() const
static GrVkSampler * Create(GrVkGpu *gpu, GrSamplerState, const skgpu::VulkanYcbcrConversionInfo &)
static SK_END_REQUIRE_DENSE Key GenerateKey(GrSamplerState, const skgpu::VulkanYcbcrConversionInfo &)
uint32_t Hash32(const void *data, size_t bytes, uint32_t seed)
GrVkSamplerYcbcrConversion::Key fYcbcrKey
Key(uint32_t samplerKey, const GrVkSamplerYcbcrConversion::Key &ycbcrKey)
bool operator==(const Key &that) const