summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-02-16 17:33:37 -0800
committerMathias Agopian <mathias@google.com>2010-02-16 17:33:37 -0800
commit8f2423e8f394ae0666f1b61f83df4c0c7a4782d9 (patch)
treecf8ea7a6f5a60e1ff45b7eeb44c2a83576787161 /opengl
parent4b71fc0fa8dee98764b55aefc176599bd982f53e (diff)
downloadframeworks_base-8f2423e8f394ae0666f1b61f83df4c0c7a4782d9.zip
frameworks_base-8f2423e8f394ae0666f1b61f83df4c0c7a4782d9.tar.gz
frameworks_base-8f2423e8f394ae0666f1b61f83df4c0c7a4782d9.tar.bz2
get rid off the YUV formats at the libui layer
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libagl/copybit.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/opengl/libagl/copybit.cpp b/opengl/libagl/copybit.cpp
index 4cacc11..67d1ce7 100644
--- a/opengl/libagl/copybit.cpp
+++ b/opengl/libagl/copybit.cpp
@@ -48,19 +48,8 @@ static void textureToCopyBitImage(
const GGLSurface* surface, int32_t opFormat,
android_native_buffer_t* buffer, copybit_image_t* img)
{
- uint32_t vstride = 0;
- if (opFormat == COPYBIT_FORMAT_YCbCr_422_SP ||
- opFormat == COPYBIT_FORMAT_YCbCr_420_SP) {
- // NOTE: this static_cast is really not safe b/c we can't know for
- // sure the buffer passed is of the right type.
- // However, since we do this only for YUV formats, we should be safe
- // since only SurfaceFlinger makes use of them.
- GraphicBuffer* graphicBuffer = static_cast<GraphicBuffer*>(buffer);
- vstride = graphicBuffer->getVerticalStride();
- }
-
img->w = surface->stride;
- img->h = vstride ? vstride : surface->height;
+ img->h = surface->height;
img->format = opFormat;
img->base = surface->data;
img->handle = (native_handle_t *)buffer->handle;
@@ -98,8 +87,6 @@ static bool supportedCopybitsFormat(int format) {
case COPYBIT_FORMAT_BGRA_8888:
case COPYBIT_FORMAT_RGBA_5551:
case COPYBIT_FORMAT_RGBA_4444:
- case COPYBIT_FORMAT_YCbCr_422_SP:
- case COPYBIT_FORMAT_YCbCr_420_SP:
return true;
default:
return false;