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

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

Issue 1390213002: Add subsetting to SkScanlineDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@fill-refactor
Patch Set: Response to comments Created 5 years, 2 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_wbmp.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr); 96 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr);
97 97
98 /* 98 /*
99 * Checks if the conversion between the input image and the requested output 99 * Checks if the conversion between the input image and the requested output
100 * image has been implemented 100 * image has been implemented
101 * Sets the output color space 101 * Sets the output color space
102 */ 102 */
103 bool setOutputColorSpace(const SkImageInfo& dst); 103 bool setOutputColorSpace(const SkImageInfo& dst);
104 104
105 // scanline decoding 105 // scanline decoding
106 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options);
106 SkSampler* getSampler(bool createIfNecessary) override; 107 SkSampler* getSampler(bool createIfNecessary) override;
107 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons, 108 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons,
108 SkPMColor ctable[], int* ctableCount) override; 109 SkPMColor ctable[], int* ctableCount) override;
109 int onGetScanlines(void* dst, int count, size_t rowBytes) override; 110 int onGetScanlines(void* dst, int count, size_t rowBytes) override;
110 bool onSkipScanlines(int count) override; 111 bool onSkipScanlines(int count) override;
111 112
112 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 113 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
113 // We will save the state of the decompress struct after reading the header. 114 // We will save the state of the decompress struct after reading the header.
114 // This allows us to safely call onGetScaledDimensions() at any time. 115 // This allows us to safely call onGetScaledDimensions() at any time.
115 const int fReadyState; 116 const int fReadyState;
116 117
117 // scanline decoding 118 // scanline decoding
118 SkAutoMalloc fStorage; // Only used if sampling is needed 119 SkAutoMalloc fStorage; // Only used if sampling is needed
119 uint8_t* fSrcRow; // Only used if sampling is needed 120 uint8_t* fSrcRow; // Only used if sampling is needed
120 SkAutoTDelete<SkSwizzler> fSwizzler; 121 SkAutoTDelete<SkSwizzler> fSwizzler;
121 122
122 typedef SkCodec INHERITED; 123 typedef SkCodec INHERITED;
123 }; 124 };
124 125
125 #endif 126 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodec_wbmp.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698