Initialize decompress struct with libjpeg-turbo's API
In order to be in less violation of libjpeg call patterns regardless of version, we should initialize with jpeg_create_decompress, that initializes the memory manager and correct state for libjpeg functions. Then we can naively modify that object. This allows SkJpegCodec functions that use a fake decompress struct to work with any version of libjpeg-turbo (at least for now).
Bug: 379669745
Change-Id: Id628284bd8004f6620609a99b96fa4803c37c818
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/927041
Commit-Queue: Daniel Dilan <danieldilan@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
1 file changed