Respect the EXIF orientation in ImageDecoder

Bug: 63909536
Test: CTS: Ia50449b9b2e3c965bbd7fb95901b239f77990344
Change-Id: I154c0e5c07968b108df5be279860f0c35441f5cf
This commit is contained in:
Leon Scroggins III
2018-01-17 11:34:43 -05:00
parent a5014f298c
commit ac1928b7a0

View File

@@ -74,7 +74,8 @@ static jobject native_create(JNIEnv* env, std::unique_ptr<SkStream> stream) {
// FIXME: Avoid parsing the whole image?
const bool animated = codec->getFrameCount() > 1;
decoder->mCodec = SkAndroidCodec::MakeFromCodec(std::move(codec));
decoder->mCodec = SkAndroidCodec::MakeFromCodec(std::move(codec),
SkAndroidCodec::ExifOrientationBehavior::kRespect);
if (!decoder->mCodec.get()) {
doThrowIOE(env, "Could not create AndroidCodec");
return nullptr;