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

Unified Diff: src/codec/SkCodec_wbmp.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_libpng.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_wbmp.h
diff --git a/src/codec/SkCodec_wbmp.h b/src/codec/SkCodec_wbmp.h
index 0891eb86b9da1a6117540af85587e661dbf00a5b..220570b0db790c8f7b8cb6ffb1d3c1f928938056 100644
--- a/src/codec/SkCodec_wbmp.h
+++ b/src/codec/SkCodec_wbmp.h
@@ -9,7 +9,6 @@
#define SkCodec_wbmp_DEFINED
#include "SkCodec.h"
-#include "SkScanlineDecoder.h"
#include "SkSwizzler.h"
class SkWbmpCodec final : public SkCodec {
@@ -23,12 +22,6 @@ public:
*/
static SkCodec* NewFromStream(SkStream*);
- /*
- * Assumes IsWbmp was called and returned true
- * Creates a wbmp scanline decoder
- * Takes ownership of the stream
- */
- static SkScanlineDecoder* NewSDFromStream(SkStream*);
protected:
SkEncodedFormat onGetEncodedFormat() const override;
Result onGetPixels(const SkImageInfo&, void*, size_t,
@@ -50,7 +43,16 @@ private:
const size_t fSrcRowBytes;
- friend class SkWbmpScanlineDecoder;
+ // Used for scanline decodes:
+ SkAutoTUnref<SkColorTable> fColorTable;
+ SkAutoTDelete<SkSwizzler> fSwizzler;
+ SkAutoTMalloc<uint8_t> fSrcBuffer;
+
+ // FIXME: Override onSkipScanlines to avoid swizzling.
+ Result onGetScanlines(void* dst, int count, size_t dstRowBytes) override;
+ Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options,
+ SkPMColor inputColorTable[], int* inputColorCount) override;
+
typedef SkCodec INHERITED;
};
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698