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

Unified Diff: src/codec/SkCodec_libgif.h

Issue 1365313002: Merge SkCodec with SkScanlineDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Skip ICO in SkScaledCodec for now 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libgif.h
diff --git a/src/codec/SkCodec_libgif.h b/src/codec/SkCodec_libgif.h
index 88455368512efb47766b9c06aeb16a18a9eeb99a..3999c41ede5c7fcc192197059532513e66e4f630 100644
--- a/src/codec/SkCodec_libgif.h
+++ b/src/codec/SkCodec_libgif.h
@@ -8,7 +8,6 @@
#include "SkCodec.h"
#include "SkColorTable.h"
#include "SkImageInfo.h"
-#include "SkScanlineDecoder.h"
#include "SkSwizzler.h"
#include "gif_lib.h"
@@ -33,8 +32,6 @@ public:
*/
static SkCodec* NewFromStream(SkStream*);
- static SkScanlineDecoder* NewSDFromStream(SkStream* stream);
-
protected:
/*
@@ -83,7 +80,7 @@ private:
* @param transIndex This call will set the transparent index based on the
* extension data.
*/
- static SkCodec::Result ReadUpToFirstImage(GifFileType* gif, uint32_t* transIndex);
+ static Result ReadUpToFirstImage(GifFileType* gif, uint32_t* transIndex);
/*
* A gif may contain many image frames, all of different sizes.
@@ -114,7 +111,7 @@ private:
* Checks for invalid inputs and calls rewindIfNeeded(), setFramDimensions(), and
* initializeColorTable() in the proper sequence.
*/
- SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr,
+ Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr,
int* inputColorCount, const Options& opts);
/*
@@ -125,14 +122,22 @@ private:
* indicated in the header.
* @param zeroInit Indicates if destination memory is zero initialized.
*/
- SkCodec::Result initializeSwizzler(const SkImageInfo& dstInfo,
- ZeroInitialized zeroInit);
+ Result initializeSwizzler(const SkImageInfo& dstInfo, ZeroInitialized zeroInit);
/*
* @return kSuccess if the read is successful and kIncompleteInput if the
* read fails.
*/
- SkCodec::Result readRow();
+ Result readRow();
+
+ Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts,
+ SkPMColor inputColorPtr[], int* inputColorCount) override;
+
+ Result onGetScanlines(void* dst, int count, size_t rowBytes) override;
+
+ SkScanlineOrder onGetScanlineOrder() const override;
+
+ int onNextScanline() const override;
/*
* This function cleans up the gif object after the decode completes
@@ -168,7 +173,5 @@ private:
SkAutoTDelete<SkSwizzler> fSwizzler;
SkAutoTUnref<SkColorTable> fColorTable;
- friend class SkGifScanlineDecoder;
-
typedef SkCodec INHERITED;
};
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698