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

Unified Diff: Source/platform/image-encoders/skia/WEBPImageEncoder.h

Issue 1302423004: Support lossy and lossless <canvas>.toDataURL for webp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing. Created 5 years, 3 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 | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/image-encoders/skia/WEBPImageEncoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/image-encoders/skia/WEBPImageEncoder.h
diff --git a/Source/platform/image-encoders/skia/WEBPImageEncoder.h b/Source/platform/image-encoders/skia/WEBPImageEncoder.h
index 3a0e9c2df4735161dceeeb3f66c98b0315c91583..dd7d74f36f3a7e859e0f001d412c489ac766c62f 100644
--- a/Source/platform/image-encoders/skia/WEBPImageEncoder.h
+++ b/Source/platform/image-encoders/skia/WEBPImageEncoder.h
@@ -39,8 +39,11 @@ struct ImageDataBuffer;
class WEBPImageEncoder {
public:
+ // For callers: control the compression mode: lossy or lossless.
+ enum Mode { Default = 0, Lossy = Default, Lossless };
+
// Encode the input data with a compression quality in [0-100].
- static bool encode(const ImageDataBuffer&, int quality, Vector<unsigned char>*);
+ static bool encode(const ImageDataBuffer&, int quality, Vector<unsigned char>*, Mode = Default);
// For callers: provide a reasonable compression quality default.
enum Quality { DefaultCompressionQuality = 80 };
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/image-encoders/skia/WEBPImageEncoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698