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

Unified Diff: include/core/SkImageDecoder.h

Issue 17620004: Remove bitmap reuse from SkImageDecoder. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add documentation. Created 7 years, 6 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 | « no previous file | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageDecoder.h
diff --git a/include/core/SkImageDecoder.h b/include/core/SkImageDecoder.h
index 360f03acb6304022b949b3d4708456c336b227c4..67c82578270c984bd124f0114ca319eb53d382a0 100644
--- a/include/core/SkImageDecoder.h
+++ b/include/core/SkImageDecoder.h
@@ -117,10 +117,10 @@ public:
Peeker* getPeeker() const { return fPeeker; }
Peeker* setPeeker(Peeker*);
- /** \class Peeker
+ /** \class Chooser
- Base class for optional callbacks to retrieve meta/chunk data out of
- an image as it is being decoded.
+ Base class for optional callbacks to choose an image from a format that
+ contains multiple images.
*/
class Chooser : public SkRefCnt {
public:
@@ -219,11 +219,20 @@ public:
* to pref if possible. Whether a conversion is feasible is
* tested by Bitmap::canCopyTo(pref).
- note: document use of Allocator, Peeker and Chooser
+ If an SkBitmap::Allocator is installed via setAllocator, it will be
+ used to allocate the pixel memory. A clever allocator can be used
+ to allocate the memory from a cache, volatile memory, or even from
+ an existing bitmap's memory.
+
+ If a Peeker is installed via setPeeker, it may be used to peek into
+ meta data during the decode.
+
+ If a Chooser is installed via setChooser, it may be used to select
+ which image to return from a format that contains multiple images.
*/
- bool decode(SkStream*, SkBitmap* bitmap, SkBitmap::Config pref, Mode, bool reuseBitmap = false);
- bool decode(SkStream* stream, SkBitmap* bitmap, Mode mode, bool reuseBitmap = false) {
- return this->decode(stream, bitmap, SkBitmap::kNo_Config, mode, reuseBitmap);
+ bool decode(SkStream*, SkBitmap* bitmap, SkBitmap::Config pref, Mode);
+ bool decode(SkStream* stream, SkBitmap* bitmap, Mode mode) {
+ return this->decode(stream, bitmap, SkBitmap::kNo_Config, mode);
}
/**
« no previous file with comments | « no previous file | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698