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

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

Issue 1254483004: Scanline decoding for wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More minor fixes 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
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_libpng.h" 8 #include "SkCodec_libpng.h"
9 #include "SkCodecPriv.h" 9 #include "SkCodecPriv.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 break; 464 break;
465 default: 465 default:
466 //would have exited before now if the colorType was supported by png 466 //would have exited before now if the colorType was supported by png
467 SkASSERT(false); 467 SkASSERT(false);
468 } 468 }
469 469
470 // Copy the color table to the client if they request kIndex8 mode 470 // Copy the color table to the client if they request kIndex8 mode
471 copy_color_table(requestedInfo, fColorTable, ctable, ctableCount); 471 copy_color_table(requestedInfo, fColorTable, ctable, ctableCount);
472 472
473 // Create the swizzler. SkPngCodec retains ownership of the color table. 473 // Create the swizzler. SkPngCodec retains ownership of the color table.
474 const SkPMColor* colors = fColorTable ? fColorTable->readColors() : NULL; 474 const SkPMColor* colors = get_color_ptr(fColorTable.get());
475 fSwizzler.reset(SkSwizzler::CreateSwizzler(fSrcConfig, colors, requestedInfo , 475 fSwizzler.reset(SkSwizzler::CreateSwizzler(fSrcConfig, colors, requestedInfo ,
476 options.fZeroInitialized)); 476 options.fZeroInitialized));
477 if (!fSwizzler) { 477 if (!fSwizzler) {
478 // FIXME: CreateSwizzler could fail for another reason. 478 // FIXME: CreateSwizzler could fail for another reason.
479 return kUnimplemented; 479 return kUnimplemented;
480 } 480 }
481 return kSuccess; 481 return kSuccess;
482 } 482 }
483 483
484 484
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 805
806 const SkImageInfo& srcInfo = codec->getInfo(); 806 const SkImageInfo& srcInfo = codec->getInfo();
807 if (codec->fNumberPasses > 1) { 807 if (codec->fNumberPasses > 1) {
808 // interlaced image 808 // interlaced image
809 return SkNEW_ARGS(SkPngInterlacedScanlineDecoder, (srcInfo, codec.detach ())); 809 return SkNEW_ARGS(SkPngInterlacedScanlineDecoder, (srcInfo, codec.detach ()));
810 } 810 }
811 811
812 return SkNEW_ARGS(SkPngScanlineDecoder, (srcInfo, codec.detach())); 812 return SkNEW_ARGS(SkPngScanlineDecoder, (srcInfo, codec.detach()));
813 } 813 }
814 814
OLDNEW
« no previous file with comments | « src/codec/SkCodecPriv.h ('k') | src/codec/SkCodec_wbmp.h » ('j') | src/codec/SkCodec_wbmp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698