Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: src/codec/SkJpegAutoClean.h

Issue 1076923002: SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-real
Patch Set: JpegAutoClean is easier to use, Scaling is tested Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkJpegAutoClean_DEFINED
9 #define SkJpegAutoClean_DEFINED
10
11 #include "SkJpegUtility.h"
12 #include "SkTemplates.h"
13
14 // stdio is needed for jpeglib
15 #include <stdio.h>
16 #include "jpeglib.h"
17
18 /*
19 * This object automatically cleans up memory after a jpeg decode
20 */
21 class JpegAutoClean : SkNoncopyable {
22 public:
23
24 /*
25 * Takes ownership of all thre input pointers.
scroggo 2015/04/14 13:10:32 three*
msarett 2015/04/14 19:30:36 Acknowledged.
26 */
27 JpegAutoClean(jpeg_decompress_struct* dinfo,
28 skjpeg_source_mgr* srcMgr,
29 skjpeg_error_mgr* errMgr);
30
31 /*
32 * Calls destroy on jpeg_decompress_struct.
33 * Owned pointers will be delted automatically.
scroggo 2015/04/14 13:10:32 deleted*
msarett 2015/04/14 19:30:36 Acknowledged.
34 */
35 ~JpegAutoClean();
36
37 /*
38 * Get the decompress info struct.
39 */
40 jpeg_decompress_struct* dinfo();
41
42 private:
43
44 SkAutoTDelete<jpeg_decompress_struct> fDInfo;
scroggo 2015/04/14 13:10:32 Do these all need to be passed in? What if you mak
msarett 2015/04/14 19:30:36 Done.
45 SkAutoTDelete<skjpeg_source_mgr> fSrcMgr;
46 SkAutoTDelete<skjpeg_error_mgr> fErrorMgr;
47 };
48
49 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698