summaryrefslogtreecommitdiffstats
path: root/external/skia/fast-png-write.patch.1
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--external/skia/fast-png-write.patch.115
1 files changed, 15 insertions, 0 deletions
diff --git a/external/skia/fast-png-write.patch.1 b/external/skia/fast-png-write.patch.1
new file mode 100644
index 000000000..f47a2af70
--- /dev/null
+++ b/external/skia/fast-png-write.patch.1
@@ -0,0 +1,15 @@
+diff --git a/src/images/SkImageEncoder.cpp b/src/images/SkImageEncoder.cpp
+index a96a93e0fc..1c110afa58 100644
+--- a/src/images/SkImageEncoder.cpp
++++ b/src/images/SkImageEncoder.cpp
+@@ -46,6 +46,10 @@ bool SkEncodeImage(SkWStream* dst, const SkPixmap& src,
+ }
+ case SkEncodedImageFormat::kPNG: {
+ SkPngEncoder::Options opts;
++ if (quality == 1) {
++ opts.fFilterFlags = SkPngEncoder::FilterFlag::kNone;
++ opts.fZLibLevel = 1;
++ }
+ return SkPngEncoder::Encode(dst, src, opts);
+ }
+ case SkEncodedImageFormat::kWEBP: {