[evas-gl] change dynamic texture's format RGBA/BGRA to ARGB 40/85440/3
authorsunghyun kim <scholb.kim@samsung.com>
Thu, 25 Aug 2016 06:22:59 +0000 (15:22 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 25 Aug 2016 11:44:05 +0000 (04:44 -0700)
now, dynamic hint set has color format problem.
so changed internal format RGBA/BGRA to ARGB.

Change-Id: Ia3160ee1dbc6afeffbcbb4d883592d277e4c601a

src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_texture.c

index 9461b8f..d78b856 100755 (executable)
@@ -725,6 +725,7 @@ extern unsigned int   (*secsym_eglGetImageAttribSEC)         (void *a, void *b,
 #define TBM_FORMAT_RGBA8888 __tbm_fourcc_code('R', 'A', '2', '4')
 #define TBM_FORMAT_BGRA8888 __tbm_fourcc_code('B', 'A', '2', '4')
 #define TBM_FORMAT_RGB888   __tbm_fourcc_code('R', 'G', '2', '4')
+#define TBM_FORMAT_ARGB8888  __tbm_fourcc_code('A', 'R', '2', '4')
 
 typedef struct _tbm_surface * tbm_surface_h;
 typedef uint32_t tbm_format;
index 7a03857..3746ba9 100755 (executable)
@@ -797,6 +797,10 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i
            default: ERR("TBM: unknown format"); goto error;
           }
 
+        // FIXME: change tbm buffer format RGBA/BGRA to ARGB. this patch need to check with driver team.
+        if((buffer_format == TBM_FORMAT_RGBA8888)||(buffer_format == TBM_FORMAT_BGRA8888))
+           buffer_format = TBM_FORMAT_ARGB8888;
+
         pt->dyn.buffer = (void *)secsym_tbm_surface_create(pt->w, pt->h,
                                                            buffer_format);
         if (!pt->dyn.buffer) goto error;