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

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

Issue 1322623004: Call standard libjpeg/libjpeg-turbo APIs from SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Need to save the state, so we can call onGetScaledDimensions before rewinding Created 5 years, 3 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 | « gyp/codec.gyp ('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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 */ 109 */
110 bool setOutputColorSpace(const SkImageInfo& dst); 110 bool setOutputColorSpace(const SkImageInfo& dst);
111 111
112 /* 112 /*
113 * Checks if we can natively scale to the requested dimensions and natively scales the 113 * Checks if we can natively scale to the requested dimensions and natively scales the
114 * dimensions if possible 114 * dimensions if possible
115 */ 115 */
116 bool nativelyScaleToDimensions(uint32_t width, uint32_t height); 116 bool nativelyScaleToDimensions(uint32_t width, uint32_t height);
117 117
118 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 118 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
119 // We will save the state of the decompress struct after reading the header.
120 // This allows us to safely call onGetScaledDimensions() at any time.
121 const int fReadyState;
119 122
120 friend class SkJpegScanlineDecoder; 123 friend class SkJpegScanlineDecoder;
121 124
122 typedef SkCodec INHERITED; 125 typedef SkCodec INHERITED;
123 }; 126 };
124 127
125 #endif 128 #endif
OLDNEW
« no previous file with comments | « gyp/codec.gyp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698