summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
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
commit54ed4f6282bdea251455f39b978626026affdbef (patch)
tree157d34806bbfab22e433c1eafe0e2bf72f832af2 /opengl/libagl
parent39696474d715de575949a9cdf12e7ff339896f8d (diff)
downloadframeworks_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 'opengl/libagl')
-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;