summaryrefslogtreecommitdiff
path: root/cros_gralloc
diff options
context:
space:
mode:
authorJason Macnak <natsu@google.com>2020-10-27 11:58:35 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-28 14:01:26 +0000
commit16be5a74aab07f80c3c5bedbfce390aa313e24c6 (patch)
tree8d10cb8bde2361d544609e7459c240ff330f725d /cros_gralloc
parentdfb45b0b5ca610e101f773ff23e3c66a02725b0a (diff)
downloadminigbm-16be5a74aab07f80c3c5bedbfce390aa313e24c6.tar.gz
cros_gralloc: Fix PlaneLayout width/height metadata
... by using the horizontal/vertical subsampling of each plane. BUG=b:171019648 TEST=vts -m VtsHalGraphicsMapperV4_0TargetTest Change-Id: I3eccfa1c0ac30394314c83b54ca50d690c679724 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2503481 Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Jason Macnak <natsu@google.com> Auto-Submit: Jason Macnak <natsu@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
Diffstat (limited to 'cros_gralloc')
-rw-r--r--cros_gralloc/gralloc4/CrosGralloc4Mapper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cros_gralloc/gralloc4/CrosGralloc4Mapper.cc b/cros_gralloc/gralloc4/CrosGralloc4Mapper.cc
index 7c85eff..0e26156 100644
--- a/cros_gralloc/gralloc4/CrosGralloc4Mapper.cc
+++ b/cros_gralloc/gralloc4/CrosGralloc4Mapper.cc
@@ -504,8 +504,8 @@ Return<void> CrosGralloc4Mapper::get(cros_gralloc_handle_t crosHandle,
planeLayout.offsetInBytes = crosHandle->offsets[plane];
planeLayout.strideInBytes = crosHandle->strides[plane];
planeLayout.totalSizeInBytes = crosHandle->sizes[plane];
- planeLayout.widthInSamples = crosHandle->width;
- planeLayout.heightInSamples = crosHandle->height;
+ planeLayout.widthInSamples = crosHandle->width / planeLayout.horizontalSubsampling;
+ planeLayout.heightInSamples = crosHandle->height / planeLayout.verticalSubsampling;
}
status = android::gralloc4::encodePlaneLayouts(planeLayouts, &encodedMetadata);