| 67 | } |
| 68 | |
| 69 | bool 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 | |
| 85 | bool pag_decoder_read_frame_to_hardware_buffer(pag_decoder* decoder, int index, void* buffer) { |
| 86 | if (decoder == nullptr) { |
nothing calls this directly
no test coverage detected