| Index: Source/platform/image-encoders/skia/PNGImageEncoder.h
|
| diff --git a/Source/platform/image-encoders/skia/PNGImageEncoder.h b/Source/platform/image-encoders/skia/PNGImageEncoder.h
|
| index e8fc52f121c399ce101461d7c6ea8d2deea2d098..5e4732c8b304b2a090b121680454a1976241cfbf 100644
|
| --- a/Source/platform/image-encoders/skia/PNGImageEncoder.h
|
| +++ b/Source/platform/image-encoders/skia/PNGImageEncoder.h
|
| @@ -39,11 +39,14 @@ namespace WebCore {
|
|
|
| struct ImageDataBuffer;
|
|
|
| -// Interface for encoding PNG data. This is a wrapper around libpng.
|
| class PNGImageEncoder {
|
| public:
|
| - static bool encode(const SkBitmap&, Vector<unsigned char>* output);
|
| - static bool encode(const ImageDataBuffer&, Vector<unsigned char>* output);
|
| + // Encode the input data with a compression quality in [0-100].
|
| + static bool encode(const SkBitmap&, int quality, Vector<unsigned char>* output);
|
| + static bool encode(const ImageDataBuffer&, int quality, Vector<unsigned char>* output);
|
| +
|
| + // For callers: provide a reasonable compression quality default.
|
| + enum Quality { DefaultCompressionQuality = 30 };
|
| };
|
|
|
| } // namespace WebCore
|
|
|