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

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

Issue 1230033004: Allow creating multiple scanline decoders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Progressive scanline decoder needs to handle rewind on first call. Created 5 years, 5 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
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SkJpegCodec_DEFINED 8 #ifndef SkJpegCodec_DEFINED
9 #define SkJpegCodec_DEFINED 9 #define SkJpegCodec_DEFINED
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 * Called only by NewFromStream 88 * Called only by NewFromStream
89 * 89 *
90 * @param srcInfo contains the source width and height 90 * @param srcInfo contains the source width and height
91 * @param stream the encoded image data 91 * @param stream the encoded image data
92 * @param decoderMgr holds decompress struct, src manager, and error manager 92 * @param decoderMgr holds decompress struct, src manager, and error manager
93 * takes ownership 93 * takes ownership
94 */ 94 */
95 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr); 95 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr);
96 96
97 /* 97 /*
98 * Explicit destructor is used to ensure that the scanline decoder is delete d
99 * before the decode manager.
100 */
101 ~SkJpegCodec() override;
102
103 /*
104 * Handles rewinding the input stream if it is necessary 98 * Handles rewinding the input stream if it is necessary
105 */ 99 */
106 bool handleRewind(); 100 bool handleRewind();
107 101
108 /* 102 /*
109 * Checks if the conversion between the input image and the requested output 103 * Checks if the conversion between the input image and the requested output
110 * image has been implemented 104 * image has been implemented
111 * Sets the output color space 105 * Sets the output color space
112 */ 106 */
113 bool setOutputColorSpace(const SkImageInfo& dst); 107 bool setOutputColorSpace(const SkImageInfo& dst);
(...skipping 11 matching lines...) Expand all
125 const Options& options); 119 const Options& options);
126 120
127 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 121 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
128 122
129 friend class SkJpegScanlineDecoder; 123 friend class SkJpegScanlineDecoder;
130 124
131 typedef SkCodec INHERITED; 125 typedef SkCodec INHERITED;
132 }; 126 };
133 127
134 #endif 128 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698