Speculative fix for flaky webp encode/decode on Nexus 5

I'm not really expecting this to work anymore...

The docs don't say anything about the rgb pointer needing
to stay valid, and it looks like we are done with it
after the call to import.

Still, worth a try I think.

BUG=skia:5876

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4024

Change-Id: I6e65ef96a2b661b01eb92bedab0acd73ed4f6218
Reviewed-on: https://skia-review.googlesource.com/4024
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
This commit is contained in:
Matt Sarett 2016-10-26 17:39:54 -04:00 committed by Skia Commit-Bot
parent cfc4f44aeb
commit 18a11a6f37

View File

@ -227,10 +227,10 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm,
} else {
ok = SkToBool(WebPPictureImportRGBA(&pic, rgb, rgbStride));
}
delete[] rgb;
ok = ok && WebPEncode(&webp_config, &pic);
WebPPictureFree(&pic);
delete[] rgb;
return ok;
}