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

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

Issue 1321433002: Add subsetting to SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-scan
Patch Set: Rebase - it compiles but I'm sure everything is broken 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/SkCodecPriv.h ('k') | src/codec/SkCodec_libgif.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 #include "SkCodec.h" 8 #include "SkCodec.h"
9 #include "SkColorTable.h" 9 #include "SkColorTable.h"
10 #include "SkImageInfo.h" 10 #include "SkImageInfo.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr, 123 Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr,
124 int* inputColorCount, const Options& opts); 124 int* inputColorCount, const Options& opts);
125 125
126 /* 126 /*
127 * Initializes the swizzler. 127 * Initializes the swizzler.
128 * 128 *
129 * @param dstInfo Output image information. Dimensions may have been 129 * @param dstInfo Output image information. Dimensions may have been
130 * adjusted if the image frame size does not match the size 130 * adjusted if the image frame size does not match the size
131 * indicated in the header. 131 * indicated in the header.
132 * @param zeroInit Indicates if destination memory is zero initialized. 132 * @param zeroInit Indicates if destination memory is zero initialized.
133 * @param subsetLeft Left offset for each row decode.
134 * @param subsetWidth Width of each row decode.
133 */ 135 */
134 Result initializeSwizzler(const SkImageInfo& dstInfo, ZeroInitialized zeroIn it); 136 Result initializeSwizzler(const SkImageInfo& dstInfo,
137 ZeroInitialized zeroInit, int subsetLeft, int subsetWidth);
135 138
136 SkSampler* getSampler(bool createIfNecessary) override { return fSwizzler; } 139 SkSampler* getSampler(bool createIfNecessary) override { return fSwizzler; }
137 140
138 /* 141 /*
139 * @return true if the read is successful and false if the read fails. 142 * @return true if the read is successful and false if the read fails.
140 */ 143 */
141 bool readRow(); 144 bool readRow();
142 145
143 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts , 146 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts ,
144 SkPMColor inputColorPtr[], int* inputColorCount) override; 147 SkPMColor inputColorPtr[], int* inputColorCount, int subsetLe ft,
148 int subsetWidth) override;
145 149
146 int onGetScanlines(void* dst, int count, size_t rowBytes) override; 150 int onGetScanlines(void* dst, int count, size_t rowBytes) override;
147 151
148 SkScanlineOrder onGetScanlineOrder() const override; 152 SkScanlineOrder onGetScanlineOrder() const override;
149 153
150 /* 154 /*
151 * This function cleans up the gif object after the decode completes 155 * This function cleans up the gif object after the decode completes
152 * It is used in a SkAutoTCallIProc template 156 * It is used in a SkAutoTCallIProc template
153 */ 157 */
154 static void CloseGif(GifFileType* gif); 158 static void CloseGif(GifFileType* gif);
(...skipping 22 matching lines...) Expand all
177 SkAutoTDeleteArray<uint8_t> fSrcBuffer; 181 SkAutoTDeleteArray<uint8_t> fSrcBuffer;
178 const SkIRect fFrameRect; 182 const SkIRect fFrameRect;
179 const uint32_t fTransIndex; 183 const uint32_t fTransIndex;
180 uint32_t fFillIndex; 184 uint32_t fFillIndex;
181 const bool fFrameIsSubset; 185 const bool fFrameIsSubset;
182 SkAutoTDelete<SkSwizzler> fSwizzler; 186 SkAutoTDelete<SkSwizzler> fSwizzler;
183 SkAutoTUnref<SkColorTable> fColorTable; 187 SkAutoTUnref<SkColorTable> fColorTable;
184 188
185 typedef SkCodec INHERITED; 189 typedef SkCodec INHERITED;
186 }; 190 };
OLDNEW
« no previous file with comments | « src/codec/SkCodecPriv.h ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698