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

Unified Diff: include/core/SkImageGenerator.h

Issue 1263013002: Remove SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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 c133476d5b40f8fd3a88a65f5a9ace6dbcb461b5..46aea7b81ede46a0dcaad6ec094cf5ed59ada6f7 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -15,8 +15,6 @@ 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
@@ -69,79 +67,6 @@ 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().
- *
- * Result is the union of possible results from subclasses.
- */
- enum Result {
- /**
- * General return value for success.
- */
- kSuccess,
- /**
- * The input is incomplete. A partial image was generated.
- */
- kIncompleteInput,
- /**
- * The generator cannot convert to match the request, ignoring
- * dimensions.
- */
- kInvalidConversion,
- /**
- * The generator cannot scale to requested size.
- */
- kInvalidScale,
- /**
- * Parameters (besides info) are invalid. e.g. NULL pixels, rowBytes
- * too small, etc.
- */
- kInvalidParameters,
- /**
- * The input did not contain a valid image.
- */
- kInvalidInput,
- /**
- * Fulfilling this request requires rewinding the input, which is not
- * supported for this input.
- */
- kCouldNotRewind,
- /**
- * This method is not implemented by this generator.
- */
- kUnimplemented,
- };
-
- /**
- * Whether or not the memory passed to getPixels is zero initialized.
- */
- enum ZeroInitialized {
- /**
- * The memory passed to getPixels is zero initialized. The SkCodec
- * may take advantage of this by skipping writing zeroes.
- */
- kYes_ZeroInitialized,
- /**
- * The memory passed to getPixels has not been initialized to zero,
- * so the SkCodec must write all zeroes to memory.
- *
- * This is the default. It will be used if no Options struct is used.
- */
- kNo_ZeroInitialized,
- };
-
- /**
- * Additional options to pass to getPixels.
- */
- struct Options {
- Options()
- : fZeroInitialized(kNo_ZeroInitialized) {}
-
- ZeroInitialized fZeroInitialized;
- };
-#endif
-
/**
* Decode into the given pixels, a block of memory of size at
* least (info.fHeight - 1) * rowBytes + (info.fWidth *
@@ -206,14 +131,8 @@ 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