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

Unified Diff: include/images/SkImageRef.h

Issue 23477009: Change SkImageDecoders to take an SkStreamRewindable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Only switch to SkStreamRewindable when necessary. Created 7 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 | « include/core/SkImageDecoder.h ('k') | include/images/SkImageRef_GlobalPool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/images/SkImageRef.h
diff --git a/include/images/SkImageRef.h b/include/images/SkImageRef.h
index bca4305b5bf3d68719a8bd6c696bb6476a1399c1..0599a8d9633dfe8a7284801b49b5d3efc78a8b9b 100644
--- a/include/images/SkImageRef.h
+++ b/include/images/SkImageRef.h
@@ -16,7 +16,7 @@
#include "SkString.h"
class SkImageRefPool;
-class SkStream;
+class SkStreamRewindable;
// define this to enable dumping whenever we add/remove/purge an imageref
//#define DUMP_IMAGEREF_LIFECYCLE
@@ -34,7 +34,8 @@ public:
@param config The preferred config of the decoded bitmap.
@param sampleSize Requested sampleSize for decoding. Defaults to 1.
*/
- SkImageRef(SkStream*, SkBitmap::Config config, int sampleSize = 1, SkBaseMutex* mutex = NULL);
+ SkImageRef(SkStreamRewindable*, SkBitmap::Config config, int sampleSize = 1,
+ SkBaseMutex* mutex = NULL);
virtual ~SkImageRef();
/** this value is passed onto the decoder. Default is true
@@ -64,7 +65,7 @@ protected:
/** Override if you want to install a custom allocator.
When this is called we will have already acquired the mutex!
*/
- virtual bool onDecode(SkImageDecoder* codec, SkStream*, SkBitmap*,
+ virtual bool onDecode(SkImageDecoder* codec, SkStreamRewindable*, SkBitmap*,
SkBitmap::Config, SkImageDecoder::Mode);
/* Overrides from SkPixelRef
@@ -81,13 +82,13 @@ protected:
SkBitmap fBitmap;
private:
- SkStream* setStream(SkStream*);
+ SkStreamRewindable* setStream(SkStreamRewindable*);
// called with mutex already held. returns true if the bitmap is in the
// requested state (or further, i.e. has pixels)
bool prepareBitmap(SkImageDecoder::Mode);
SkImageDecoderFactory* fFactory; // may be null
- SkStream* fStream;
+ SkStreamRewindable* fStream;
SkBitmap::Config fConfig;
int fSampleSize;
bool fDoDither;
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/images/SkImageRef_GlobalPool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698