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

Unified Diff: include/core/SkImageGenerator.h

Issue 1226023003: Remove SkImageGenerator pieces only for SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@severIG
Patch Set: Change the public interface without staging it. Created 5 years, 5 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/core/SkImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageGenerator.h
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index f55c72bc1e49ec0ec7c0ce5ffdf07737ffb7c9cc..a398697e6ba4eaa1f521bbf6f2107f1af4876f82 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -15,6 +15,8 @@ class SkBitmap;
class SkData;
class SkImageGenerator;
+//#define SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
+
/**
* Takes ownership of SkImageGenerator. If this method fails for
* whatever reason, it will return false and immediatetely delete
@@ -67,6 +69,7 @@ public:
*/
const SkImageInfo& getInfo() const { return fInfo; }
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
/**
* Used to describe the result of a call to getPixels().
*
@@ -137,6 +140,7 @@ public:
ZeroInitialized fZeroInitialized;
};
+#endif
/**
* Decode into the given pixels, a block of memory of size at
@@ -165,16 +169,16 @@ public:
* If info is not kIndex8_SkColorType, then the last two parameters may be NULL. If ctableCount
* is not null, it will be set to 0.
*
- * @return Result kSuccess, or another value explaining the type of failure.
+ * @return true on success.
*/
- Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options*,
- SkPMColor ctable[], int* ctableCount);
+ bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ SkPMColor ctable[], int* ctableCount);
/**
* Simplified version of getPixels() that asserts that info is NOT kIndex8_SkColorType and
* uses the default Options.
*/
- Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
+ bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
/**
* If planes or rowBytes is NULL or if any entry in planes is NULL or if any entry in rowBytes
@@ -202,9 +206,14 @@ protected:
virtual SkData* onRefEncodedData();
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
virtual Result onGetPixels(const SkImageInfo& info,
void* pixels, size_t rowBytes, const Options&,
SkPMColor ctable[], int* ctableCount);
+#else
+ virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ SkPMColor ctable[], int* ctableCount);
+#endif
virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]);
virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
SkYUVColorSpace* colorSpace);
« no previous file with comments | « no previous file | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698