BufferAccess inputs should be width/height and not right/left

Bug: 311658952

Change-Id: I0e18f866f9f6db136141210b07321cd4fe466726
Signed-off-by: Devika Krishnadas <kdevika@google.com>
diff --git a/gralloc4/src/hidl_common/Mapper.cpp b/gralloc4/src/hidl_common/Mapper.cpp
index 288b5a3..62cac7c 100644
--- a/gralloc4/src/hidl_common/Mapper.cpp
+++ b/gralloc4/src/hidl_common/Mapper.cpp
@@ -212,8 +212,10 @@
 	}
 
 	void* data = nullptr;
-	const int gralloc_err = mali_gralloc_lock(bufferHandle, cpuUsage, accessRegion.left, accessRegion.top,
-	                                          accessRegion.right, accessRegion.bottom, &data);
+	const int gralloc_err =
+		mali_gralloc_lock(bufferHandle, cpuUsage, accessRegion.left, accessRegion.top,
+				  accessRegion.right - accessRegion.left,
+				  accessRegion.bottom - accessRegion.top, &data);
 	const Error lock_err = grallocErrorToMapperError(gralloc_err);
 
 	if(Error::NONE == lock_err)