From 5eabeaf821322dd86bfa4f53cd822a9b299659e4 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 7 Aug 2009 20:56:29 -0700 Subject: [PATCH] add support for RGBX_8888. HOWEVER MDP doesn't support it yet, so we use XRGB which looks wrong for now --- libcopybit/copybit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp index 8347a0c..cb17de2 100644 --- a/libcopybit/copybit.cpp +++ b/libcopybit/copybit.cpp @@ -105,9 +105,11 @@ static void intersect(struct copybit_rect_t *out, /** convert COPYBIT_FORMAT to MDP format */ static int get_format(int format) { switch (format) { + case COPYBIT_FORMAT_RGB_565: return MDP_RGB_565; + case COPYBIT_FORMAT_RGBX_8888: return MDP_XRGB_8888; // currently wrong + case COPYBIT_FORMAT_RGB_888: return MDP_RGB_888; case COPYBIT_FORMAT_RGBA_8888: return MDP_RGBA_8888; case COPYBIT_FORMAT_BGRA_8888: return MDP_BGRA_8888; - case COPYBIT_FORMAT_RGB_565: return MDP_RGB_565; case COPYBIT_FORMAT_YCbCr_422_SP: return MDP_Y_CBCR_H2V1; case COPYBIT_FORMAT_YCbCr_420_SP: return MDP_Y_CBCR_H2V2; }