hwc: fix source crop when using gscaler m2m
authorGreg Hackmann <ghackmann@google.com>
Fri, 17 Aug 2012 00:28:57 +0000 (17:28 -0700)
committerGreg Hackmann <ghackmann@google.com>
Fri, 17 Aug 2012 16:23:29 +0000 (09:23 -0700)
The source image has already been scaled and cropped, so adjust the
source crop accordingly

Change-Id: Ife09a8eecb4e20c60a8e8ef54164e1a14c5a2718
Signed-off-by: Greg Hackmann <ghackmann@google.com>
libhwc/hwc.cpp

index 24a3bec524fc40e6d1a6d2bcd996edd9001d8e85..94ed19cf2ca01749488022b47051f1d6174e792f 100644 (file)
@@ -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 {