Remove loop unrolling code in onQueryYUV8

This patch removes the loop unrolling code in onQueryYUV8()
to improve code readability.

Bug: skia: None
Change-Id: Iddbc0a114fae05234bfea39802f19a430f6c86ec
Reviewed-on: https://skia-review.googlesource.com/22000
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This commit is contained in:
nagarajan.n 2017-07-19 19:53:21 +05:30 committed by Skia Commit-Bot
parent 67e3429ce0
commit b1854fad3a

View File

@ -825,15 +825,11 @@ bool SkJpegCodec::onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpa
return false;
}
sizeInfo->fSizes[SkYUVSizeInfo::kY].set(dinfo->comp_info[0].downsampled_width,
dinfo->comp_info[0].downsampled_height);
sizeInfo->fSizes[SkYUVSizeInfo::kU].set(dinfo->comp_info[1].downsampled_width,
dinfo->comp_info[1].downsampled_height);
sizeInfo->fSizes[SkYUVSizeInfo::kV].set(dinfo->comp_info[2].downsampled_width,
dinfo->comp_info[2].downsampled_height);
sizeInfo->fWidthBytes[SkYUVSizeInfo::kY] = dinfo->comp_info[0].width_in_blocks * DCTSIZE;
sizeInfo->fWidthBytes[SkYUVSizeInfo::kU] = dinfo->comp_info[1].width_in_blocks * DCTSIZE;
sizeInfo->fWidthBytes[SkYUVSizeInfo::kV] = dinfo->comp_info[2].width_in_blocks * DCTSIZE;
jpeg_component_info * comp_info = dinfo->comp_info;
for (auto i : { SkYUVSizeInfo::kY, SkYUVSizeInfo::kU, SkYUVSizeInfo::kV }) {
sizeInfo->fSizes[i].set(comp_info[i].downsampled_width, comp_info[i].downsampled_height);
sizeInfo->fWidthBytes[i] = comp_info[i].width_in_blocks * DCTSIZE;
}
if (colorSpace) {
*colorSpace = kJPEG_SkYUVColorSpace;