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

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

Issue 1820073002: Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 4 years, 9 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
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkJpegDecoderMgr_DEFINED 8 #ifndef SkJpegDecoderMgr_DEFINED
9 #define SkJpegDecoderMgr_DEFINED 9 #define SkJpegDecoderMgr_DEFINED
10 10
(...skipping 27 matching lines...) Expand all
38 */ 38 */
39 JpegDecoderMgr(SkStream* stream); 39 JpegDecoderMgr(SkStream* stream);
40 40
41 /* 41 /*
42 * Initialize decompress struct 42 * Initialize decompress struct
43 * Initialize the source manager 43 * Initialize the source manager
44 */ 44 */
45 void init(); 45 void init();
46 46
47 /* 47 /*
48 * Recommend a color type based on the encoded format 48 * Returns true on success and false on failure.
49 *
50 * @param color Output parameter is set to the SkEncodedInfo::Color that mat ches
51 * the jpeg's encoded color type
52 *
49 */ 53 */
50 SkColorType getColorType(); 54 bool getEncodedColor(SkEncodedInfo::Color* color);
51 55
52 /* 56 /*
53 * Free memory used by the decode manager 57 * Free memory used by the decode manager
54 */ 58 */
55 ~JpegDecoderMgr(); 59 ~JpegDecoderMgr();
56 60
57 /* 61 /*
58 * Get the jump buffer in order to set an error return point 62 * Get the jump buffer in order to set an error return point
59 */ 63 */
60 jmp_buf& getJmpBuf(); 64 jmp_buf& getJmpBuf();
61 65
62 /* 66 /*
63 * Get function for the decompress info struct 67 * Get function for the decompress info struct
64 */ 68 */
65 jpeg_decompress_struct* dinfo(); 69 jpeg_decompress_struct* dinfo();
66 70
67 private: 71 private:
68 72
69 jpeg_decompress_struct fDInfo; 73 jpeg_decompress_struct fDInfo;
70 skjpeg_source_mgr fSrcMgr; 74 skjpeg_source_mgr fSrcMgr;
71 skjpeg_error_mgr fErrorMgr; 75 skjpeg_error_mgr fErrorMgr;
72 bool fInit; 76 bool fInit;
73 }; 77 };
74 78
75 #endif 79 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698