More informative error message for image decoding failure. (flutter/engine#4389)

This commit is contained in:
amirh
2017-11-22 17:11:53 -08:00
committed by GitHub
parent 8b0815d5de
commit f3d45b017c

View File

@@ -75,7 +75,8 @@ fxl::RefPtr<Codec> InitCodec(sk_sp<SkData> buffer, size_t trace_id) {
std::unique_ptr<SkCodec> skCodec = SkCodec::MakeFromData(buffer);
if (!skCodec) {
FXL_LOG(ERROR) << "SkCodec::MakeFromData failed";
FXL_LOG(ERROR) << "Failed decoding image. Data is either invalid, or it is "
"encoded using an unsupported format.";
return nullptr;
}
if (skCodec->getFrameCount() > 1) {