summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorSnigdha Sinha <snigdha.sinha@motorola.com>2009-08-31 13:02:23 -0500
committerJames Dong <jdong@google.com>2009-09-08 18:28:15 -0700
commitfd98ff8b391085a3f01bf3dcf2fffc6181e299fb (patch)
tree16068d9b43a4980b364026a8fdff46a9090a87dc /camera
parentb0dccf73ddb5a695fe24f1435411feea5876609f (diff)
downloadframeworks_base-fd98ff8b391085a3f01bf3dcf2fffc6181e299fb.zip
frameworks_base-fd98ff8b391085a3f01bf3dcf2fffc6181e299fb.tar.gz
frameworks_base-fd98ff8b391085a3f01bf3dcf2fffc6181e299fb.tar.bz2
CameraService change for OVERLAY_FORMAT_DEFAULT
Originally from: https://partner.source.android.com/g/#change,829
Diffstat (limited to 'camera')
-rw-r--r--camera/libcameraservice/CameraService.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp
index e66b00f..3c2dc2b 100644
--- a/camera/libcameraservice/CameraService.cpp
+++ b/camera/libcameraservice/CameraService.cpp
@@ -552,17 +552,6 @@ status_t CameraService::Client::setOverlay()
CameraParameters params(mHardware->getParameters());
params.getPreviewSize(&w, &h);
- const char *format = params.getPreviewFormat();
- int fmt;
- if (!strcmp(format, "yuv422i-yuyv"))
- fmt = OVERLAY_FORMAT_YCbYCr_422_I;
- else if (!strcmp(format, "rgb565"))
- fmt = OVERLAY_FORMAT_RGB_565;
- else {
- LOGE("Invalid preview format for overlays");
- return -EINVAL;
- }
-
if ( w != mOverlayW || h != mOverlayH )
{
// Force the destruction of any previous overlay
@@ -574,7 +563,7 @@ status_t CameraService::Client::setOverlay()
status_t ret = NO_ERROR;
if (mSurface != 0) {
if (mOverlayRef.get() == NULL) {
- mOverlayRef = mSurface->createOverlay(w, h, fmt);
+ mOverlayRef = mSurface->createOverlay(w, h, OVERLAY_FORMAT_DEFAULT);
if ( mOverlayRef.get() == NULL )
{
LOGE("Overlay Creation Failed!");