#include <GrYUVABackendTextures.h>
|
static constexpr auto | kMaxPlanes = SkYUVAInfo::kMaxPlanes |
|
A description of a set GrBackendTextures that hold the planar data described by a SkYUVAInfo.
Definition at line 19 of file GrYUVABackendTextures.h.
◆ GrYUVABackendTextureInfo() [1/3]
GrYUVABackendTextureInfo::GrYUVABackendTextureInfo |
( |
| ) |
|
|
default |
◆ GrYUVABackendTextureInfo() [2/3]
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.
Definition at line 25 of file GrYUVABackendTextures.cpp.
31 *this = {};
33 return;
34 }
36 for (
size_t i = 0; i < static_cast<size_t>(n); ++
i) {
38 *this = {};
40 return;
41 }
45 if (numActualChannels < numRequiredChannels) {
46 *this = {};
48 return;
49 }
50 fPlaneFormats[
i] = formats[
i];
51 }
53}
static int num_channels(const GrBackendFormat &format)
skgpu::Mipmapped mipmapped() const
const SkYUVAInfo & yuvaInfo() const
int numChannelsInPlane(int i) const
◆ GrYUVABackendTextureInfo() [3/3]
◆ isValid()
bool GrYUVABackendTextureInfo::isValid |
( |
| ) |
const |
|
inline |
◆ mipmapped()
◆ numPlanes()
int GrYUVABackendTextureInfo::numPlanes |
( |
| ) |
const |
|
inline |
◆ operator!=()
◆ operator=()
◆ operator==()
Definition at line 55 of file GrYUVABackendTextures.cpp.
55 {
56 if (fYUVAInfo != that.fYUVAInfo ||
57 fMipmapped != that.fMipmapped ||
58 fTextureOrigin != that.fTextureOrigin) {
59 return false;
60 }
62 return std::equal(fPlaneFormats, fPlaneFormats + n, that.fPlaneFormats);
63}
static bool equal(const SkBitmap &a, const SkBitmap &b)
◆ planeFormat()
◆ textureOrigin()
◆ toYUVALocations()
Computes a YUVALocations representation of the planar layout. The result is guaranteed to be valid if this->isValid().
Definition at line 65 of file GrYUVABackendTextures.cpp.
65 {
66 uint32_t channelFlags[] = {fPlaneFormats[0].
channelMask(),
75}
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
YUVALocations toYUVALocations(const uint32_t *channelFlags) const
static bool AreValidLocations(const SkYUVAInfo::YUVALocations &locations, int *numPlanes=nullptr)
◆ yuvaInfo()
const SkYUVAInfo & GrYUVABackendTextureInfo::yuvaInfo |
( |
| ) |
const |
|
inline |
◆ yuvColorSpace()
◆ kMaxPlanes
constexpr auto GrYUVABackendTextureInfo::kMaxPlanes = SkYUVAInfo::kMaxPlanes |
|
staticconstexpr |
The documentation for this class was generated from the following files: