From 90219f32a19cfaa1c24673452e9f33cccc092e21 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Thu, 16 Aug 2012 17:28:57 -0700 Subject: [PATCH] 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 --- libhwc/hwc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 { -- 2.20.1