| Index: src/codec/SkJpegAutoClean.cpp
|
| diff --git a/src/codec/SkJpegAutoClean.cpp b/src/codec/SkJpegAutoClean.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f2bc9f3df93d3db4c6f51b78911fe35801f1c411
|
| --- /dev/null
|
| +++ b/src/codec/SkJpegAutoClean.cpp
|
| @@ -0,0 +1,27 @@
|
| +/*
|
| + * Copyright 2015 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#include "SkJpegAutoClean.h"
|
| +#include "SkJpegUtility.h"
|
| +
|
| +JpegAutoClean::JpegAutoClean(jpeg_decompress_struct* dinfo,
|
| + skjpeg_source_mgr* srcMgr,
|
| + skjpeg_error_mgr* errorMgr)
|
| + : fDInfo(dinfo)
|
| + , fSrcMgr(srcMgr)
|
| + , fErrorMgr(errorMgr)
|
| +{}
|
| +
|
| +JpegAutoClean::~JpegAutoClean() {
|
| + if (NULL != fDInfo) {
|
| + jpeg_destroy_decompress(fDInfo);
|
| + }
|
| +}
|
| +
|
| +jpeg_decompress_struct* JpegAutoClean::dinfo() {
|
| + return fDInfo;
|
| +}
|
|
|