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: 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..3fca9995e73134673c594efbd37d2a1ea56e522c 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
@@ -167,14 +171,23 @@ public:
*
* @return Result kSuccess, or another value explaining the type of failure.
*/
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options*,
SkPMColor ctable[], int* ctableCount);
+#else
+ bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
reed1 2015/07/09 15:26:45 Can you just expose these variants of getPixels w/
scroggo 2015/07/09 15:51:59 Yes. I'd forgotten that all of the callers of getP
+ SkPMColor ctable[], int* ctableCount);
+#endif
/**
* Simplified version of getPixels() that asserts that info is NOT kIndex8_SkColorType and
* uses the default Options.
*/
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
+#else
+ bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
+#endif
/**
* If planes or rowBytes is NULL or if any entry in planes is NULL or if any entry in rowBytes
@@ -202,9 +215,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