Y-invert ARGB images 49/100549/1 accepted/tizen/common/20161129.173735 accepted/tizen/ivi/20161130.015925 accepted/tizen/mobile/20161130.015830 accepted/tizen/tv/20161130.015848 accepted/tizen/wearable/20161130.015905 submit/tizen/20161129.132307
authorjoonbum.ko <joonbum.ko@samsung.com>
Mon, 28 Nov 2016 08:29:58 +0000 (17:29 +0900)
committerVasiliy Ulyanov <v.ulyanov@samsung.com>
Mon, 28 Nov 2016 10:47:32 +0000 (13:47 +0300)
This patch resolves the issue with widgets rendered upside-down. Tizen
platfrom expects 'yinvert == 1' for EGL images created from tizen sfc.

Change-Id: If34b0c717f705a13351d94b50361b2a6d5945998
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
EGL/yagl_onscreen_image_tizen_sfc.c

index b30bdf1125446435617fdadc6a01c17130e1c412..031d4a0fc60287edf5f73d3a79db317dfb56d22b 100644 (file)
@@ -102,6 +102,15 @@ static bool yagl_onscreen_image_tizen_sfc_convert(struct yagl_onscreen_image_tiz
     dst += info.width * info.height - info.width;
 
     switch (info.format) {
+    case TBM_FORMAT_ARGB8888:
+        for (i = 0; i < info.height; i++) {
+            for (j = 0; j < info.width; j++) {
+                uint32_t argb = ((uint32_t *)info.planes[0].ptr)[i * info.width + j];
+
+                *(dst - i * info.width + j) = argb;
+            }
+        }
+        break;
     case TBM_FORMAT_RGBA8888:
         for (i = 0; i < info.height; i++) {
             for (j = 0; j < info.width; j++) {
@@ -199,10 +208,10 @@ struct yagl_onscreen_image_tizen_sfc
 
     switch (info.format) {
         case TBM_FORMAT_RGB888:
-        case TBM_FORMAT_ARGB8888:
         case TBM_FORMAT_XRGB8888:
             need_convert = false;
             break;
+        case TBM_FORMAT_ARGB8888:
         case TBM_FORMAT_RGBA8888:
         case TBM_FORMAT_NV21:
         case TBM_FORMAT_YUV420: