Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 9b7dfd13b72241fe0abfeb1959c6e461f14c883f..c2ee5093fb679898c7c94d37814db7a1dc9d3049 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -8,6 +8,7 @@ |
#ifndef SkImage_DEFINED |
#define SkImage_DEFINED |
+#include "SkImageEncoder.h" |
#include "SkRefCnt.h" |
#include "SkScalar.h" |
@@ -82,15 +83,6 @@ public: |
void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); |
- enum EncodeType { |
- kBMP_EncodeType, |
- kGIF_EncodeType, |
- kICO_EncodeType, |
- kJPEG_EncodeType, |
- kPNG_EncodeType, |
- kWBMP_EncodeType, |
- kWEBP_EncodeType, |
- }; |
/** |
* Encode the image's pixels and return the result as a new SkData, which |
* the caller must manage (i.e. call unref() when they are done). |
@@ -98,7 +90,8 @@ public: |
* If the image type cannot be encoded, or the requested encoder type is |
* not supported, this will return NULL. |
*/ |
- SkData* encode(EncodeType t = kPNG_EncodeType, int quality = 80) const; |
+ SkData* encode(SkImageEncoder::Type t = SkImageEncoder::kPNG_Type, |
+ int quality = 80) const; |
protected: |
SkImage(int width, int height) : |