| 156 | } |
| 157 | |
| 158 | bool PAGDecoder::readFrame(int index, void* pixels, size_t rowBytes, ColorType colorType, |
| 159 | AlphaType alphaType) { |
| 160 | std::lock_guard<std::mutex> autoLock(locker); |
| 161 | auto info = |
| 162 | tgfx::ImageInfo::Make(_width, _height, ToTGFX(colorType), ToTGFX(alphaType), rowBytes); |
| 163 | auto bitmap = BitmapBuffer::Wrap(info, pixels); |
| 164 | return readFrameInternal(index, bitmap); |
| 165 | } |
| 166 | |
| 167 | bool PAGDecoder::readFrame(int index, HardwareBufferRef hardwareBuffer) { |
| 168 | std::lock_guard<std::mutex> autoLock(locker); |