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

Side by Side Diff: src/codec/SkBmpStandardCodec.cpp

Issue 1294613002: Revert of SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « include/codec/SkScanlineDecoder.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 "SkBmpStandardCodec.h" 8 #include "SkBmpStandardCodec.h"
9 #include "SkCodecPriv.h" 9 #include "SkCodecPriv.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 default: 230 default:
231 SkASSERT(false); 231 SkASSERT(false);
232 return false; 232 return false;
233 } 233 }
234 234
235 // Get a pointer to the color table if it exists 235 // Get a pointer to the color table if it exists
236 const SkPMColor* colorPtr = get_color_ptr(fColorTable.get()); 236 const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
237 237
238 // Create swizzler 238 // Create swizzler
239 fSwizzler.reset(SkSwizzler::CreateSwizzler(config, 239 fSwizzler.reset(SkSwizzler::CreateSwizzler(config,
240 colorPtr, dstInfo, opts.fZeroInitialized, this->getInfo())); 240 colorPtr, dstInfo, opts.fZeroInitialized));
241 241
242 if (NULL == fSwizzler.get()) { 242 if (NULL == fSwizzler.get()) {
243 return false; 243 return false;
244 } 244 }
245 return true; 245 return true;
246 } 246 }
247 247
248 /* 248 /*
249 * Choose a fill for failures due to an incomplete image. We will use zero as 249 * Choose a fill for failures due to an incomplete image. We will use zero as
250 * the default palette index, black for opaque images, and transparent for 250 * the default palette index, black for opaque images, and transparent for
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 uint32_t alphaBit = 352 uint32_t alphaBit =
353 (fSrcBuffer.get()[quotient] >> shift) & 0x1; 353 (fSrcBuffer.get()[quotient] >> shift) & 0x1;
354 dstRow[x] &= alphaBit - 1; 354 dstRow[x] &= alphaBit - 1;
355 } 355 }
356 } 356 }
357 } 357 }
358 358
359 // Finished decoding the entire image 359 // Finished decoding the entire image
360 return kSuccess; 360 return kSuccess;
361 } 361 }
OLDNEW
« no previous file with comments | « include/codec/SkScanlineDecoder.h ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698