aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec
diff options
context:
space:
mode:
authorGravatar Chong Zhang <chz@google.com>2017-08-23 11:17:36 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-23 19:44:56 +0000
commit722b3a7d2f6b5d98fe1661736e254ab26fc89761 (patch)
treeed65f7bfb46902c0e22fc4208e5a57aba6ff15e7 /src/codec
parent38db79f7ba6fdcd29c3032bf8c4e1eb6f895065a (diff)
Initialize the swizzler if there is a subset
Bug: b/64077740 Change-Id: Ic6bef3f63bcda24fc3d88ce0cdcf1216441faa40 Reviewed-on: https://skia-review.googlesource.com/37680 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/SkHeifCodec.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/codec/SkHeifCodec.cpp b/src/codec/SkHeifCodec.cpp
index 008c12960f..10675112b7 100644
--- a/src/codec/SkHeifCodec.cpp
+++ b/src/codec/SkHeifCodec.cpp
@@ -279,6 +279,7 @@ SkCodec::Result SkHeifCodec::onGetPixels(const SkImageInfo& dstInfo,
return kInvalidInput;
}
+ fSwizzler.reset(nullptr);
this->allocateStorage(dstInfo);
int rows = this->readRows(dstInfo, dst, dstRowBytes, dstInfo.height(), options);
@@ -355,6 +356,12 @@ SkCodec::Result SkHeifCodec::onStartScanlineDecode(
return kInvalidInput;
}
+ if (options.fSubset) {
+ this->initializeSwizzler(dstInfo, options);
+ } else {
+ fSwizzler.reset(nullptr);
+ }
+
this->allocateStorage(dstInfo);
return kSuccess;