diff options
author | Mathias Agopian <mathias@google.com> | 2010-02-16 17:33:37 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-02-16 17:33:37 -0800 |
commit | 54ed4f6282bdea251455f39b978626026affdbef (patch) | |
tree | 157d34806bbfab22e433c1eafe0e2bf72f832af2 /libs/surfaceflinger/Layer.cpp | |
parent | 39696474d715de575949a9cdf12e7ff339896f8d (diff) | |
download | frameworks_native-54ed4f6282bdea251455f39b978626026affdbef.zip frameworks_native-54ed4f6282bdea251455f39b978626026affdbef.tar.gz frameworks_native-54ed4f6282bdea251455f39b978626026affdbef.tar.bz2 |
get rid off the YUV formats at the libui layer
Diffstat (limited to 'libs/surfaceflinger/Layer.cpp')
-rw-r--r-- | libs/surfaceflinger/Layer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp index f38efab..c080513 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); |