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

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

Issue 1287423002: Scanline decoding for bmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix windows errors 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 | « src/codec/SkCodec_libgif.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 #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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 } 732 }
733 733
734 SkCodec::Result onSkipScanlines(int count) override { 734 SkCodec::Result onSkipScanlines(int count) override {
735 //when ongetScanlines is called it will skip to fCurrentRow 735 //when ongetScanlines is called it will skip to fCurrentRow
736 fCurrentRow += count; 736 fCurrentRow += count;
737 return SkCodec::kSuccess; 737 return SkCodec::kSuccess;
738 } 738 }
739 739
740 bool onReallyHasAlpha() const override { return fHasAlpha; } 740 bool onReallyHasAlpha() const override { return fHasAlpha; }
741 741
742 bool onRequiresPostYSampling() override { 742 SkScanlineOrder onGetScanlineOrder() const override {
743 return true; 743 return kNone_SkScanlineOrder;
744 } 744 }
745 745
746 SkEncodedFormat onGetEncodedFormat() const override { 746 SkEncodedFormat onGetEncodedFormat() const override {
747 return kPNG_SkEncodedFormat; 747 return kPNG_SkEncodedFormat;
748 } 748 }
749 749
750 private: 750 private:
751 SkAutoTDelete<SkPngCodec> fCodec; 751 SkAutoTDelete<SkPngCodec> fCodec;
752 bool fHasAlpha; 752 bool fHasAlpha;
753 int fCurrentRow; 753 int fCurrentRow;
(...skipping 25 matching lines...) Expand all
779 779
780 const SkImageInfo& srcInfo = codec->getInfo(); 780 const SkImageInfo& srcInfo = codec->getInfo();
781 if (codec->fNumberPasses > 1) { 781 if (codec->fNumberPasses > 1) {
782 // interlaced image 782 // interlaced image
783 return new SkPngInterlacedScanlineDecoder(srcInfo, codec.detach()); 783 return new SkPngInterlacedScanlineDecoder(srcInfo, codec.detach());
784 } 784 }
785 785
786 return new SkPngScanlineDecoder(srcInfo, codec.detach()); 786 return new SkPngScanlineDecoder(srcInfo, codec.detach());
787 } 787 }
788 788
OLDNEW
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698