Remove SkImageGenerator pieces only for SkCodec.

Follow up to the split between SkImageGenerator and SkCodec. Now that
SkCodec does not inherit from SkImageGenerator, SkImageGenerator no
longer needs Options or Result, which were added for SkCodec. Remove
them, but keep them behind a flag, since Chromium has its own
subclasses of SkImageGenerator which assume the old signature for
onGetPixels.

Review URL: https://codereview.chromium.org/1226023003
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index f55c72b..a398697 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -15,6 +15,8 @@
 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 @@
      */
     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 @@
 
         ZeroInitialized fZeroInitialized;
     };
+#endif
 
     /**
      *  Decode into the given pixels, a block of memory of size at
@@ -165,16 +169,16 @@
      *  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 @@
 
     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);