Temporarily use default webp encode method for bzl
I suspect that this will fix the failing golden image tests.
Bug: skia:
Change-Id: I9f88206ae782e6a04817e72cdfcb3e0c4bdaa293
Reviewed-on: https://skia-review.googlesource.com/17393
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
diff --git a/public.bzl b/public.bzl
index 1813af0..ba3b3b0 100644
--- a/public.bzl
+++ b/public.bzl
@@ -659,6 +659,8 @@
# Turn on a few Google3-specific build fixes.
"GOOGLE3",
# Staging flags for API changes
+ # Should remove after we update golden images
+ "SK_WEBP_ENCODER_USE_DEFAULT_METHOD",
# Temporarily Disable analytic AA for Google3
"SK_NO_ANALYTIC_AA",
]
diff --git a/src/images/SkWebpEncoder.cpp b/src/images/SkWebpEncoder.cpp
index b6c6212..276837c 100644
--- a/src/images/SkWebpEncoder.cpp
+++ b/src/images/SkWebpEncoder.cpp
@@ -171,7 +171,9 @@
// could potentially expose this to the client.
if (Compression::kLossy == opts.fCompression) {
webp_config.lossless = 0;
+#ifndef SK_WEBP_ENCODER_USE_DEFAULT_METHOD
webp_config.method = 3;
+#endif
} else {
webp_config.lossless = 1;
webp_config.method = 0;