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

Unified Diff: src/images/SkDecodingImageGenerator.h

Issue 101973005: SkDecodingImageGenerator now uses SkStreamRewindable (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/images/SkDecodingImageGenerator.h
diff --git a/src/images/SkDecodingImageGenerator.h b/src/images/SkDecodingImageGenerator.h
index 49f1295bf3538cdd69451c8f86cb383eea44596a..c47555e4f85d1d7432d502f5e9fa43c68cb2a0ed 100644
--- a/src/images/SkDecodingImageGenerator.h
+++ b/src/images/SkDecodingImageGenerator.h
@@ -10,8 +10,10 @@
#include "SkDiscardableMemory.h"
#include "SkImageGenerator.h"
+#include "SkImageInfo.h"
class SkBitmap;
+class SkStreamRewindable;
/**
* Calls into SkImageDecoder::DecodeMemoryToTarget to implement a
@@ -23,7 +25,13 @@ public:
* The constructor will take a reference to the SkData. The
* destructor will unref() it.
*/
- SkDecodingImageGenerator(SkData* data);
+ explicit SkDecodingImageGenerator(SkData* data);
+
+ /*
+ * This constructor will duplicate this stream.
+ */
+ explicit SkDecodingImageGenerator(SkStreamRewindable* stream);
+
virtual ~SkDecodingImageGenerator();
virtual SkData* refEncodedData() SK_OVERRIDE;
@@ -52,8 +60,14 @@ public:
*/
static bool Install(SkData* data, SkBitmap* destination,
SkDiscardableMemory::Factory* factory = NULL);
+ static bool Install(SkStreamRewindable* stream, SkBitmap* destination,
+ SkDiscardableMemory::Factory* factory = NULL);
private:
- SkData* fData;
+ SkData* fData;
+ SkStreamRewindable* fStream;
+ SkImageInfo fInfo;
+ bool fHasInfo;
+ bool fDoCopyTo;
};
#endif // SkDecodingImageGenerator_DEFINED

Powered by Google App Engine
This is Rietveld 408576698