From: Greg Hackmann Date: Fri, 17 Aug 2012 00:28:57 +0000 (-0700) Subject: hwc: fix source crop when using gscaler m2m X-Git-Tag: cm-10.1-M1~238 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=90219f32a19cfaa1c24673452e9f33cccc092e21;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git hwc: fix source crop when using gscaler m2m The source image has already been scaled and cropped, so adjust the source crop accordingly Change-Id: Ife09a8eecb4e20c60a8e8ef54164e1a14c5a2718 Signed-off-by: Greg Hackmann --- diff --git a/libhwc/hwc.cpp b/libhwc/hwc.cpp index 24a3bec..94ed19c 100644 --- a/libhwc/hwc.cpp +++ b/libhwc/hwc.cpp @@ -927,7 +927,9 @@ static void exynos5_post_callback(void *data, private_handle_t *fb) gsc.current_buf = (gsc.current_buf + 1) % NUM_GSC_DST_BUFS; private_handle_t *dst_handle = private_handle_t::dynamicCast(dst_buf); - exynos5_config_handle(dst_handle, layer.sourceCrop, + hwc_rect_t sourceCrop = { 0, 0, + WIDTH(layer.displayFrame), HEIGHT(layer.displayFrame) }; + exynos5_config_handle(dst_handle, sourceCrop, layer.displayFrame, layer.blending, config[i]); } else {