Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 5b9e2031758f8ebc317041289a0603f8113d1ece..763ccc6882815b941cdf0996c3d83e8fbcb5b16f 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -21,6 +21,7 @@ class SkColorTable; |
class SkImageGenerator; |
class SkPaint; |
class SkPicture; |
+class SkPixelSerializer; |
class SkString; |
class SkSurface; |
class SkSurfaceProps; |
@@ -223,9 +224,16 @@ public: |
*/ |
SkData* encode(SkImageEncoder::Type, int quality) const; |
- SkData* encode() const { |
- return this->encode(SkImageEncoder::kPNG_Type, 100); |
- } |
+ /** |
+ * Encode the image's pixels using an optional SkPixelSerializer, and return the result |
+ * as a caller-managed SkData. |
+ * |
+ * If the serializer is NULL, a default PNG encoder (with quality == 100) will be used. |
reed1
2015/09/03 02:36:13
How about this as a way to organize this wackiness
f(malita)
2015/09/03 14:10:27
(this looks truncated, did you have more text whic
|
+ * |
+ * This method may return exising encoded data (from refEncoded) if it passes the |
+ * serializer's useEncodedData() test, or the serializer itself is NULL. |
+ */ |
+ SkData* encode(SkPixelSerializer* = nullptr) const; |
/** |
* If the image already has its contents in encoded form (e.g. PNG or JPEG), return a ref |