33 {
35 if (!stream) {
36 return;
37 }
40 if (!codec) {
41 return;
42 }
43
44
46
49
50
51 bool success = codec->queryYUVAInfo(kAllTypes, nullptr);
53
54 success = codec->queryYUVAInfo(kNoTypes, &yuvaPixmapInfo);
56
57 success = codec->queryYUVAInfo(kAllTypes, &yuvaPixmapInfo);
59 if (!success) {
60 return;
61 }
63
64 int numPlanes = yuvaPixmapInfo.
numPlanes();
66 for (int i = 0; i < numPlanes; ++i) {
72
75 }
81 }
82
83
86
89 }
92 }
93
94
96}
std::unique_ptr< SkStreamAsset > GetResourceAsStream(const char *resource, bool useFileStream)
@ kUnknown_SkColorType
uninitialized
static constexpr bool SkToBool(const T &x)
#define REPORTER_ASSERT(r, cond,...)
static std::unique_ptr< SkCodec > MakeFromStream(std::unique_ptr< SkStream >, SkSpan< const SkCodecs::Decoder > decoders, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage)
static constexpr int kMaxPlanes
static constexpr SupportedDataTypes All()
size_t rowBytes(int i) const
const SkYUVAInfo & yuvaInfo() const
DataType dataType() const
static std::tuple< int, DataType > NumChannelsAndDataType(SkColorType)
const SkImageInfo & planeInfo(int i) const
static SkYUVAPixmaps Allocate(const SkYUVAPixmapInfo &yuvaPixmapInfo)
static constexpr auto kMaxPlanes
SkISize dimensions() const
SkColorType colorType() const
bool validRowBytes(size_t rowBytes) const