Skia
2D Graphics Library
GrYUVABackendTextureInfo Class Reference

A description of a set GrBackendTextures that hold the planar data described by a SkYUVAInfo. More...

#include <GrYUVABackendTextures.h>

Public Member Functions

 GrYUVABackendTextureInfo ()=default
 Default GrYUVABackendTextureInfo is invalid. More...
 
 GrYUVABackendTextureInfo (const SkYUVAInfo &, const GrBackendFormat[kMaxPlanes], skgpu::Mipmapped, GrSurfaceOrigin)
 Initializes a GrYUVABackendTextureInfo to describe a set of textures that can store the planes indicated by the SkYUVAInfo. More...
 
 GrYUVABackendTextureInfo (const GrYUVABackendTextureInfo &)=default
 
GrYUVABackendTextureInfooperator= (const GrYUVABackendTextureInfo &)=default
 
bool operator== (const GrYUVABackendTextureInfo &) const
 
bool operator!= (const GrYUVABackendTextureInfo &that) const
 
const SkYUVAInfoyuvaInfo () const
 
SkYUVColorSpace yuvColorSpace () const
 
skgpu::Mipmapped mipmapped () const
 
GrSurfaceOrigin textureOrigin () const
 
int numPlanes () const
 The number of SkPixmap planes, 0 if this GrYUVABackendTextureInfo is invalid. More...
 
const GrBackendFormatplaneFormat (int i) const
 Format of the ith plane, or invalid format if i >= numPlanes() More...
 
bool isValid () const
 Returns true if this has been configured with a valid SkYUVAInfo with compatible texture formats. More...
 
SkYUVAInfo::YUVALocations toYUVALocations () const
 Computes a YUVALocations representation of the planar layout. More...
 

Static Public Attributes

static constexpr auto kMaxPlanes = SkYUVAInfo::kMaxPlanes
 

Detailed Description

A description of a set GrBackendTextures that hold the planar data described by a SkYUVAInfo.

Constructor & Destructor Documentation

◆ GrYUVABackendTextureInfo() [1/3]

GrYUVABackendTextureInfo::GrYUVABackendTextureInfo ( )
default

Default GrYUVABackendTextureInfo is invalid.

◆ GrYUVABackendTextureInfo() [2/3]

GrYUVABackendTextureInfo::GrYUVABackendTextureInfo ( const SkYUVAInfo ,
const  GrBackendFormat[kMaxPlanes],
skgpu::Mipmapped  ,
GrSurfaceOrigin   
)

Initializes a GrYUVABackendTextureInfo to describe a set of textures that can store the planes indicated by the SkYUVAInfo.

The texture dimensions are taken from the SkYUVAInfo's plane dimensions. All the described textures share a common origin. The planar image this describes will be mip mapped if all the textures are individually mip mapped as indicated by skgpu::Mipmapped. This will produce an invalid result (return false from isValid()) if the passed formats' channels don't agree with SkYUVAInfo.

◆ GrYUVABackendTextureInfo() [3/3]

GrYUVABackendTextureInfo::GrYUVABackendTextureInfo ( const GrYUVABackendTextureInfo )
default

Member Function Documentation

◆ isValid()

bool GrYUVABackendTextureInfo::isValid ( ) const
inline

Returns true if this has been configured with a valid SkYUVAInfo with compatible texture formats.

◆ mipmapped()

skgpu::Mipmapped GrYUVABackendTextureInfo::mipmapped ( ) const
inline

◆ numPlanes()

int GrYUVABackendTextureInfo::numPlanes ( ) const
inline

The number of SkPixmap planes, 0 if this GrYUVABackendTextureInfo is invalid.

◆ operator!=()

bool GrYUVABackendTextureInfo::operator!= ( const GrYUVABackendTextureInfo that) const
inline

◆ operator=()

GrYUVABackendTextureInfo& GrYUVABackendTextureInfo::operator= ( const GrYUVABackendTextureInfo )
default

◆ operator==()

bool GrYUVABackendTextureInfo::operator== ( const GrYUVABackendTextureInfo ) const

◆ planeFormat()

const GrBackendFormat& GrYUVABackendTextureInfo::planeFormat ( int  i) const
inline

Format of the ith plane, or invalid format if i >= numPlanes()

◆ textureOrigin()

GrSurfaceOrigin GrYUVABackendTextureInfo::textureOrigin ( ) const
inline

◆ toYUVALocations()

SkYUVAInfo::YUVALocations GrYUVABackendTextureInfo::toYUVALocations ( ) const

Computes a YUVALocations representation of the planar layout.

The result is guaranteed to be valid if this->isValid().

◆ yuvaInfo()

const SkYUVAInfo& GrYUVABackendTextureInfo::yuvaInfo ( ) const
inline

◆ yuvColorSpace()

SkYUVColorSpace GrYUVABackendTextureInfo::yuvColorSpace ( ) const
inline

Member Data Documentation

◆ kMaxPlanes

constexpr auto GrYUVABackendTextureInfo::kMaxPlanes = SkYUVAInfo::kMaxPlanes
staticconstexpr

The documentation for this class was generated from the following file: