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

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: 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
Index: src/codec/SkCodec_libgif.h
diff --git a/src/codec/SkCodec_libgif.h b/src/codec/SkCodec_libgif.h
index 88455368512efb47766b9c06aeb16a18a9eeb99a..d9ee20e7c73703f30527ff5daead8925cfc6ce90 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 onStart(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 onGetY() const override;
/*
* This function cleans up the gif object after the decode completes

Powered by Google App Engine
This is Rietveld 408576698