/** *TextureInfoisabackend-agnosticwrapperaroundthepropertiesofatexture,sansdimensions. *Itisdesignedthiswaytobecompilablew/obringinginaspecificbackend'sbuildfiles,and *withoutrequiringheapallocationsofvirtualtypes.
*/ class SK_API TextureInfo { private: class Data; friendclass MtlTextureInfo; friendclass DawnTextureInfo; friendclass VulkanTextureInfo;
// Size is the largest of the Data subclasses assuming a 64-bit compiler. inline constexpr static size_t kMaxSubclassSize = 112; using AnyTextureInfoData = SkAnySubclass<Data, kMaxSubclassSize>;
// Base properties for all backend-specific properties. Clients managing textures directly // should use the public subclasses of Data directly, e.g. MtlTextureInfo/DawnTextureInfo. // // Each backend subclass must expose to TextureInfo[Priv]: // static constexpr BackendApi kBackend; // Protected isProtected() const; // TextureFormat viewFormat() const; class Data { public: virtual ~Data() = default;
// NOTE: These fields are accessible via the backend-specific subclasses.
SampleCount fSampleCount = SampleCount::k1;
Mipmapped fMipmapped = Mipmapped::kNo;
virtualvoid copyTo(AnyTextureInfoData&) const = 0; // Passed in TextureInfo will have data of the same backend type and subclass, and // base properties of Data have already been checked for equality/compatibility. virtualbool isCompatible(const TextureInfo& that, bool requireExact) const = 0;
};
// Return true if `that` describes a texture that is compatible with this info and can validly // be used to fulfill a promise image that was created with this TextureInfo. bool canBeFulfilledBy(const TextureInfo& that) const { returnthis->isCompatible(that, /*requireExact=*/false);
}
// Return a string containing the full description of this TextureInfo.
SkString toString() const;
// Derived properties from the backend data, cached to avoid a virtual function call
TextureFormat fViewFormat; Protected fProtected = Protected::kNo;
};
} // namespace skgpu::graphite
#endif// skgpu_graphite_TextureInfo_DEFINED
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.