summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew F. Davis2019-06-11 16:12:17 -0500
committerAndrew F. Davis2019-06-28 10:32:54 -0500
commit1a110865576e04f67f4e4ec3f750e2e6c144f450 (patch)
tree7036db264cc619ee542d4e18b9e7ca52cdefd5a8
parent02ed3f46139f04851124dfdfda34fa764f7d64d5 (diff)
downloadhardware-ti-am65x-1a110865576e04f67f4e4ec3f750e2e6c144f450.tar.gz
hardware-ti-am65x-1a110865576e04f67f4e4ec3f750e2e6c144f450.tar.xz
hardware-ti-am65x-1a110865576e04f67f4e4ec3f750e2e6c144f450.zip
libhwcomposer: Remove reliance on shared header for stride alignmentd-pie-core-released-android10-core-release
The allocated stride of graphics buffers is determined by many factors in a given system including requirements by various components that work with them. Because of this the buffer stride produced by gralloc may change even for single system given it's build time settings. Due to this, relying on a definition in a shared header file can be fragile. Luckily our Gralloc implementation has a way to share a given buffer's stride in the attached header information. Use this value instead of calculating it ourselves. Signed-off-by: Andrew F. Davis <afd@ti.com>
-rw-r--r--libhwcomposer/drmfb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhwcomposer/drmfb.cpp b/libhwcomposer/drmfb.cpp
index a368c10..8905ff6 100644
--- a/libhwcomposer/drmfb.cpp
+++ b/libhwcomposer/drmfb.cpp
@@ -43,7 +43,7 @@ DRMFramebuffer::DRMFramebuffer(int drm_fd, buffer_handle_t handle) :
43 this->height = img_hnd->iHeight; 43 this->height = img_hnd->iHeight;
44 this->format = convert_hal_to_drm_format(img_hnd->iFormat, true); 44 this->format = convert_hal_to_drm_format(img_hnd->iFormat, true);
45 this->bo[0] = gem_handle; 45 this->bo[0] = gem_handle;
46 this->pitches[0] = ALIGN(img_hnd->iWidth, HW_ALIGN) * get_format_bpp(img_hnd->iFormat) >> 3; 46 this->pitches[0] = img_hnd->aiStride[0] * get_format_bpp(img_hnd->iFormat) >> 3;
47 this->offsets[0] = 0; 47 this->offsets[0] = 0;
48 this->drm_fd = drm_fd; 48 this->drm_fd = drm_fd;
49 49