From 54ed4f6282bdea251455f39b978626026affdbef Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 16 Feb 2010 17:33:37 -0800 Subject: get rid off the YUV formats at the libui layer --- libs/surfaceflinger/Layer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libs/surfaceflinger/Layer.cpp') diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp index f38efab3d2..c0805137f2 100644 --- a/libs/surfaceflinger/Layer.cpp +++ b/libs/surfaceflinger/Layer.cpp @@ -185,20 +185,20 @@ void Layer::reloadTexture(const Region& dirty) if (res == NO_ERROR) { int bpp = 0; switch (t.format) { - case GGL_PIXEL_FORMAT_RGB_565: - case GGL_PIXEL_FORMAT_RGBA_4444: + case HAL_PIXEL_FORMAT_RGB_565: + case HAL_PIXEL_FORMAT_RGBA_4444: bpp = 2; break; - case GGL_PIXEL_FORMAT_RGBA_8888: - case GGL_PIXEL_FORMAT_RGBX_8888: + case HAL_PIXEL_FORMAT_RGBA_8888: + case HAL_PIXEL_FORMAT_RGBX_8888: bpp = 4; break; - case GGL_PIXEL_FORMAT_YCbCr_422_SP: - case GGL_PIXEL_FORMAT_YCbCr_420_SP: - // just show the Y plane of YUV buffers - bpp = 1; - break; default: + if (isSupportedYuvFormat(t.format)) { + // just show the Y plane of YUV buffers + bpp = 1; + break; + } // oops, we don't handle this format! LOGE("layer %p, texture=%d, using format %d, which is not " "supported by the GL", this, texture->name, t.format); -- cgit v1.2.3-59-g8ed1b