8 #ifndef GrYUVABackendTextures_DEFINED
9 #define GrYUVABackendTextures_DEFINED
55 int numPlanes()
const {
return fYUVAInfo.numPlanes(); }
64 bool isValid()
const {
return fYUVAInfo.isValid(); }
95 const std::array<GrBackendTexture, SkYUVAInfo::kMaxPlanes>&
textures()
const {
101 return fTextures[
static_cast<size_t>(i)];
110 bool isValid()
const {
return fYUVAInfo.isValid(); }
120 std::array<GrBackendTexture, SkYUVAInfo::kMaxPlanes> fTextures;
GrSurfaceOrigin
GPU SkImage and SkSurfaces can be stored such that (0, 0) in texture space may correspond to either t...
Definition: GrTypes.h:156
@ kTopLeft_GrSurfaceOrigin
Definition: GrTypes.h:157
SkYUVColorSpace
Definition: SkImageInfo.h:68
Definition: GrBackendSurface.h:176
A description of a set GrBackendTextures that hold the planar data described by a SkYUVAInfo.
Definition: GrYUVABackendTextures.h:19
skgpu::Mipmapped mipmapped() const
Definition: GrYUVABackendTextures.h:50
bool operator==(const GrYUVABackendTextureInfo &) const
GrYUVABackendTextureInfo(const SkYUVAInfo &, const GrBackendFormat[kMaxPlanes], skgpu::Mipmapped, GrSurfaceOrigin)
Initializes a GrYUVABackendTextureInfo to describe a set of textures that can store the planes indica...
const GrBackendFormat & planeFormat(int i) const
Format of the ith plane, or invalid format if i >= numPlanes()
Definition: GrYUVABackendTextures.h:58
GrYUVABackendTextureInfo & operator=(const GrYUVABackendTextureInfo &)=default
bool isValid() const
Returns true if this has been configured with a valid SkYUVAInfo with compatible texture formats.
Definition: GrYUVABackendTextures.h:64
GrSurfaceOrigin textureOrigin() const
Definition: GrYUVABackendTextures.h:52
SkYUVAInfo::YUVALocations toYUVALocations() const
Computes a YUVALocations representation of the planar layout.
int numPlanes() const
The number of SkPixmap planes, 0 if this GrYUVABackendTextureInfo is invalid.
Definition: GrYUVABackendTextures.h:55
GrYUVABackendTextureInfo()=default
Default GrYUVABackendTextureInfo is invalid.
bool operator!=(const GrYUVABackendTextureInfo &that) const
Definition: GrYUVABackendTextures.h:44
GrYUVABackendTextureInfo(const GrYUVABackendTextureInfo &)=default
SkYUVColorSpace yuvColorSpace() const
Definition: GrYUVABackendTextures.h:48
const SkYUVAInfo & yuvaInfo() const
Definition: GrYUVABackendTextures.h:46
A set of GrBackendTextures that hold the planar data for an image described a SkYUVAInfo.
Definition: GrYUVABackendTextures.h:82
bool isValid() const
Definition: GrYUVABackendTextures.h:110
const std::array< GrBackendTexture, SkYUVAInfo::kMaxPlanes > & textures() const
Definition: GrYUVABackendTextures.h:95
int numPlanes() const
Definition: GrYUVABackendTextures.h:106
const SkYUVAInfo & yuvaInfo() const
Definition: GrYUVABackendTextures.h:104
GrYUVABackendTextures & operator=(GrYUVABackendTextures &&)=default
GrYUVABackendTextures & operator=(const GrYUVABackendTextures &)=delete
GrYUVABackendTextures(GrYUVABackendTextures &&)=default
GrYUVABackendTextures(const GrYUVABackendTextures &)=delete
GrBackendTexture texture(int i) const
Definition: GrYUVABackendTextures.h:99
GrSurfaceOrigin textureOrigin() const
Definition: GrYUVABackendTextures.h:108
SkYUVAInfo::YUVALocations toYUVALocations() const
Computes a YUVALocations representation of the planar layout.
GrYUVABackendTextures()=default
GrYUVABackendTextures(const SkYUVAInfo &, const GrBackendTexture[SkYUVAInfo::kMaxPlanes], GrSurfaceOrigin textureOrigin)
Specifies the structure of planes for a YUV image with optional alpha.
Definition: SkYUVAInfo.h:26
static constexpr int kMaxPlanes
Definition: SkYUVAInfo.h:98
std::array< YUVALocation, kYUVAChannelCount > YUVALocations
Definition: SkYUVAInfo.h:32
Mipmapped
Is the texture mipmapped or not.
Definition: GpuTypes.h:53