MCPcopy Create free account
hub / github.com/Tencent/libpag / pag_decoder_read_frame

Function pag_decoder_read_frame

src/c/pag_decoder.cpp:69–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool pag_decoder_read_frame(pag_decoder* decoder, int index, void* pixels, size_t rowBytes,
70 pag_color_type colorType, pag_alpha_type alphaType) {
71 if (decoder == nullptr) {
72 return false;
73 }
74 pag::ColorType color;
75 if (!FromCColorType(colorType, &color)) {
76 return false;
77 }
78 pag::AlphaType alpha;
79 if (!FromCAlphaType(alphaType, &alpha)) {
80 return false;
81 }
82 return decoder->p->readFrame(index, pixels, rowBytes, color, alpha);
83}
84
85bool pag_decoder_read_frame_to_hardware_buffer(pag_decoder* decoder, int index, void* buffer) {
86 if (decoder == nullptr) {

Callers

nothing calls this directly

Calls 3

FromCColorTypeFunction · 0.85
FromCAlphaTypeFunction · 0.85
readFrameMethod · 0.45

Tested by

no test coverage detected