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

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

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move Jpeg Swizzler to ScanlineDecoder Created 5 years, 4 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 SkJpegCodec_DEFINED 8 #ifndef SkJpegCodec_DEFINED
9 #define SkJpegCodec_DEFINED 9 #define SkJpegCodec_DEFINED
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 * Called only by NewFromStream 94 * Called only by NewFromStream
95 * 95 *
96 * @param srcInfo contains the source width and height 96 * @param srcInfo contains the source width and height
97 * @param stream the encoded image data 97 * @param stream the encoded image data
98 * @param decoderMgr holds decompress struct, src manager, and error manager 98 * @param decoderMgr holds decompress struct, src manager, and error manager
99 * takes ownership 99 * takes ownership
100 */ 100 */
101 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr); 101 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr);
102 102
103 /* 103 /*
104 * Create the swizzler based on the encoded format
scroggo 2015/08/06 15:09:11 This should probably state that it is only used in
emmaleer 2015/08/06 18:59:52 Acknowledged.
105 */
106 Result initializeSwizzler(const SkImageInfo& requestedInfo, const Options&);
107
108 /*
104 * Handles rewinding the input stream if it is necessary 109 * Handles rewinding the input stream if it is necessary
105 */ 110 */
106 bool handleRewind(); 111 bool handleRewind();
107 112
108 /* 113 /*
109 * Checks if the conversion between the input image and the requested output 114 * Checks if the conversion between the input image and the requested output
110 * image has been implemented 115 * image has been implemented
111 * Sets the output color space 116 * Sets the output color space
112 */ 117 */
113 bool setOutputColorSpace(const SkImageInfo& dst); 118 bool setOutputColorSpace(const SkImageInfo& dst);
114 119
115 /* 120 /*
116 * Checks if we can scale to the requested dimensions and scales the dimensi ons 121 * Checks if we can natively scale to the requested dimensions and natively scales the
117 * if possible 122 * dimensions if possible
118 */ 123 */
119 bool scaleToDimensions(uint32_t width, uint32_t height); 124 bool nativelyScaleToDimensions(uint32_t width, uint32_t height);
120
121 /*
122 * Create the swizzler based on the encoded format
123 */
124 void initializeSwizzler(const SkImageInfo& dstInfo, void* dst, size_t dstRow Bytes,
125 const Options& options);
126 125
127 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 126 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
128 127
129 friend class SkJpegScanlineDecoder; 128 friend class SkJpegScanlineDecoder;
130 129
131 typedef SkCodec INHERITED; 130 typedef SkCodec INHERITED;
132 }; 131 };
133 132
134 #endif 133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698