Temporarily use default webp encode method for bzl
authorMatt Sarett <msarett@google.com>
Fri, 19 May 2017 16:57:03 +0000 (12:57 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 19 May 2017 17:20:23 +0000 (17:20 +0000)
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>
public.bzl
src/images/SkWebpEncoder.cpp

index 1813af0..ba3b3b0 100644 (file)
@@ -659,6 +659,8 @@ DEFINES_ALL = [
     # 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",
 ]
index b6c6212..276837c 100644 (file)
@@ -171,7 +171,9 @@ bool SkWebpEncoder::Encode(SkWStream* stream, const SkPixmap& pixmap, const Opti
     // 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;