17size_t GrAttachment::onGpuMemorySize()
const {
49 SkASSERT(
static_cast<uint32_t
>(isProtected) <= 1);
50 SkASSERT(
static_cast<uint32_t
>(memoryless) <= 1);
51 SkASSERT(
static_cast<uint32_t
>(requiredUsage) < (1u << 8));
52 SkASSERT(
static_cast<uint32_t
>(sampleCnt) < (1u << (32 - 10)));
55 (*builder)[0] = dimensions.
width();
56 (*builder)[1] = dimensions.
height();
57 (*builder)[2] = formatKey & 0xFFFFFFFF;
58 (*builder)[3] = (formatKey >> 32) & 0xFFFFFFFF;
59 (*builder)[4] = (
static_cast<uint32_t
>(isProtected) << 0) |
60 (
static_cast<uint32_t
>(memoryless) << 1) |
61 (
static_cast<uint32_t
>(requiredUsage) << 2) |
62 (
static_cast<uint32_t
>(sampleCnt) << 10);
static void build_key(skgpu::ResourceKey::Builder *builder, const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, GrAttachment::UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, GrMemoryless memoryless)
SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat &format)
size_t GrBackendFormatBytesPerBlock(const GrBackendFormat &format)
static constexpr bool SkToBool(const T &x)
skgpu::Mipmapped mipmapped() const
static void ComputeScratchKey(const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected, GrMemoryless, skgpu::ScratchKey *key)
static void ComputeSharedAttachmentUniqueKey(const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, GrMemoryless memoryless, skgpu::UniqueKey *key)
virtual uint64_t computeFormatKey(const GrBackendFormat &) const =0
virtual GrBackendFormat backendFormat() const =0
SkISize dimensions() const
static ResourceType GenerateResourceType()
static Domain GenerateDomain()
uint32_t uint32_t * format
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
size_t NumCompressedBlocks(SkTextureCompressionType type, SkISize baseDimensions)
constexpr int32_t width() const
constexpr int32_t height() const