Reland "Initialize decompress struct with libjpeg-turbo's API"

This reverts commit eecb5a5c0a3f927d001f8444cae4b0c2d9dbcb74.

Reason for revert: Fix memory leak.
Original change's description:
> Revert "Initialize decompress struct with libjpeg-turbo's API"
>
> This reverts commit 144fe2a4fbac9c8c05be3f58c3f0e71a554bddcc.
>
> Reason for revert: ASAN failures
>
> Original change's description:
> > 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>
>
> Bug: 379669745
> Change-Id: Iac1b115f9b7cf507d09bdf1813fa3ccf7e457df8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/927599
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Daniel Dilan <danieldilan@google.com>

Bug: 379669745
Change-Id: I5b9bc18fc91574d21e9144c26216efca5221b5c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/927603
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Daniel Dilan <danieldilan@google.com>
1 file changed