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

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

Issue 1820073002: Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Order of param eval bug Created 4 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
« no previous file with comments | « src/codec/SkIcoCodec.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 * Ownership is unchanged when we set decoderMgrOut. 79 * Ownership is unchanged when we set decoderMgrOut.
80 * 80 *
81 */ 81 */
82 static bool ReadHeader(SkStream* stream, SkCodec** codecOut, 82 static bool ReadHeader(SkStream* stream, SkCodec** codecOut,
83 JpegDecoderMgr** decoderMgrOut); 83 JpegDecoderMgr** decoderMgrOut);
84 84
85 /* 85 /*
86 * Creates an instance of the decoder 86 * Creates an instance of the decoder
87 * Called only by NewFromStream 87 * Called only by NewFromStream
88 * 88 *
89 * @param srcInfo contains the source width and height 89 * @param info contains properties of the encoded data
90 * @param stream the encoded image data 90 * @param stream the encoded image data
91 * @param decoderMgr holds decompress struct, src manager, and error manager 91 * @param decoderMgr holds decompress struct, src manager, and error manager
92 * takes ownership 92 * takes ownership
93 */ 93 */
94 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr, 94 SkJpegCodec(int width, int height, const SkEncodedInfo& info, SkStream* stre am,
95 sk_sp<SkColorSpace> colorSpace, Origin origin); 95 JpegDecoderMgr* decoderMgr, sk_sp<SkColorSpace> colorSpace, Origin o rigin);
96 96
97 /* 97 /*
98 * Checks if the conversion between the input image and the requested output 98 * Checks if the conversion between the input image and the requested output
99 * image has been implemented 99 * image has been implemented
100 * Sets the output color space 100 * Sets the output color space
101 */ 101 */
102 bool setOutputColorSpace(const SkImageInfo& dst); 102 bool setOutputColorSpace(const SkImageInfo& dst);
103 103
104 // scanline decoding 104 // scanline decoding
105 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options); 105 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options);
(...skipping 14 matching lines...) Expand all
120 // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo 120 // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo
121 // cannot take the exact the subset that we need, we will use the swizzler 121 // cannot take the exact the subset that we need, we will use the swizzler
122 // to further subset the output from libjpeg-turbo. 122 // to further subset the output from libjpeg-turbo.
123 SkIRect fSwizzlerSubset; 123 SkIRect fSwizzlerSubset;
124 SkAutoTDelete<SkSwizzler> fSwizzler; 124 SkAutoTDelete<SkSwizzler> fSwizzler;
125 125
126 typedef SkCodec INHERITED; 126 typedef SkCodec INHERITED;
127 }; 127 };
128 128
129 #endif 129 #endif
OLDNEW
« no previous file with comments | « src/codec/SkIcoCodec.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698