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

Unified Diff: src/images/SkDecodingImageGenerator.h

Issue 226253003: Change SkDecodingImageGenerator to hide implementation details. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkDecodingImageGenerator.h
diff --git a/src/images/SkDecodingImageGenerator.h b/src/images/SkDecodingImageGenerator.h
index fef7c6c7c789a0f1e4d5a6af9834a649c33c04cb..17802433b166b446bc43f4ceb089945d4553bb94 100644
--- a/src/images/SkDecodingImageGenerator.h
+++ b/src/images/SkDecodingImageGenerator.h
@@ -18,15 +18,7 @@ class SkStreamRewindable;
* An implementation of SkImageGenerator that calls into
* SkImageDecoder.
*/
-class SkDecodingImageGenerator : public SkImageGenerator {
-public:
- virtual ~SkDecodingImageGenerator();
- virtual SkData* refEncodedData() SK_OVERRIDE;
- // This implementaion of getInfo() always returns true.
- virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE;
- virtual bool getPixels(const SkImageInfo& info,
- void* pixels,
- size_t rowBytes) SK_OVERRIDE;
+namespace SkDecodingImageGenerator {
reed2 2014/04/04 20:59:51 Why namespace instead of class? Other examples in
/**
* These options will be passed on to the image decoder. The
* defaults are sensible.
@@ -97,31 +89,15 @@ public:
*
* @return NULL on failure, a new SkImageGenerator on success.
*/
- static SkImageGenerator* Create(SkStreamRewindable* stream,
- const Options& opt);
+ SkImageGenerator* Create(SkStreamRewindable* stream,
+ const Options& opt);
/**
* @param data Contains the encoded image data that will be used by
* the SkDecodingImageGenerator. Will be ref()ed by the
* SkImageGenerator constructor and and unref()ed on deletion.
*/
- static SkImageGenerator* Create(SkData* data, const Options& opt);
-
-private:
- SkData* fData;
- SkStreamRewindable* fStream;
- const SkImageInfo fInfo;
- const int fSampleSize;
- const bool fDitherImage;
-
- SkDecodingImageGenerator(SkData* data,
- SkStreamRewindable* stream,
- const SkImageInfo& info,
- int sampleSize,
- bool ditherImage);
- static SkImageGenerator* Create(SkData*, SkStreamRewindable*,
- const Options&);
- typedef SkImageGenerator INHERITED;
+ SkImageGenerator* Create(SkData* data, const Options& opt);
};
// // Example of most basic use case:
« no previous file with comments | « no previous file | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698