summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-07-31 12:08:24 +0900
committerChia-I Wu <[email protected]>2011-08-21 02:01:49 +0800
commit9650483acded249d766441dd37db5af9b9b1e245 (patch)
treeafede8ac6ad555e73c70fe68cb2d04a42581ff9e /src/gallium
parentf496d8b86da63f43239457a2f44920401d872bd6 (diff)
winsys/sw/android: use HAL formats
Native buffers use HAL formats, not UI formats.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/sw/android/android_sw_winsys.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/gallium/winsys/sw/android/android_sw_winsys.cpp b/src/gallium/winsys/sw/android/android_sw_winsys.cpp
index 6ea48b25c39..02faf1e0cca 100644
--- a/src/gallium/winsys/sw/android/android_sw_winsys.cpp
+++ b/src/gallium/winsys/sw/android/android_sw_winsys.cpp
@@ -32,8 +32,9 @@
#include "util/u_format.h"
#include "state_tracker/sw_winsys.h"
-#include <ui/PixelFormat.h>
+#include <utils/Errors.h>
#include <private/ui/sw_gralloc_handle.h>
+
#include <hardware/gralloc.h>
#include "android_sw_winsys.h"
@@ -183,39 +184,29 @@ android_is_displaytarget_format_supported(struct sw_winsys *ws,
enum pipe_format format)
{
struct android_sw_winsys *droid = android_sw_winsys(ws);
- int fmt;
+ int fmt = -1;
switch (format) {
case PIPE_FORMAT_R8G8B8A8_UNORM:
- fmt = PIXEL_FORMAT_RGBA_8888;
+ fmt = HAL_PIXEL_FORMAT_RGBA_8888;
break;
case PIPE_FORMAT_R8G8B8X8_UNORM:
- fmt = PIXEL_FORMAT_RGBX_8888;
+ fmt = HAL_PIXEL_FORMAT_RGBX_8888;
break;
case PIPE_FORMAT_R8G8B8_UNORM:
- fmt = PIXEL_FORMAT_RGB_888;
+ fmt = HAL_PIXEL_FORMAT_RGB_888;
break;
case PIPE_FORMAT_B5G6R5_UNORM:
- fmt = PIXEL_FORMAT_RGB_565;
+ fmt = HAL_PIXEL_FORMAT_RGB_565;
break;
case PIPE_FORMAT_B8G8R8A8_UNORM:
- fmt = PIXEL_FORMAT_BGRA_8888;
- break;
- case PIPE_FORMAT_A8_UNORM:
- fmt = PIXEL_FORMAT_A_8;
- break;
- case PIPE_FORMAT_L8_UNORM:
- fmt = PIXEL_FORMAT_L_8;
- break;
- case PIPE_FORMAT_L8A8_UNORM:
- fmt = PIXEL_FORMAT_LA_88;
+ fmt = HAL_PIXEL_FORMAT_BGRA_8888;
break;
default:
- fmt = PIXEL_FORMAT_NONE;
break;
}
- return (fmt != PIXEL_FORMAT_NONE);
+ return (fmt != -1);
}
static void