diff options
author | Mathias Agopian <mathias@google.com> | 2013-03-12 18:42:23 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-03-12 18:42:23 -0700 |
commit | 99617adda9bc46c43f511f0940bc735c73de61de (patch) | |
tree | 67b71170ce74451ec384346407629d54cd7e403f /camera/Camera.cpp | |
parent | 3eca0ac4428aa74f197a2a498d84490c4e30f11d (diff) | |
download | frameworks_av-99617adda9bc46c43f511f0940bc735c73de61de.zip frameworks_av-99617adda9bc46c43f511f0940bc735c73de61de.tar.gz frameworks_av-99617adda9bc46c43f511f0940bc735c73de61de.tar.bz2 |
remove uses of Surface in favor or IGraphicBufferProducer
Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
Diffstat (limited to 'camera/Camera.cpp')
-rw-r--r-- | camera/Camera.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp index e8908d2..1b136de 100644 --- a/camera/Camera.cpp +++ b/camera/Camera.cpp @@ -96,32 +96,14 @@ status_t Camera::unlock() return c->unlock(); } -// pass the buffered Surface to the camera service -status_t Camera::setPreviewDisplay(const sp<Surface>& surface) -{ - ALOGV("setPreviewDisplay(%p)", surface.get()); - sp <ICamera> c = mCamera; - if (c == 0) return NO_INIT; - if (surface != 0) { - return c->setPreviewDisplay(surface); - } else { - ALOGD("app passed NULL surface"); - return c->setPreviewDisplay(0); - } -} - // pass the buffered IGraphicBufferProducer to the camera service status_t Camera::setPreviewTexture(const sp<IGraphicBufferProducer>& bufferProducer) { ALOGV("setPreviewTexture(%p)", bufferProducer.get()); sp <ICamera> c = mCamera; if (c == 0) return NO_INIT; - if (bufferProducer != 0) { - return c->setPreviewTexture(bufferProducer); - } else { - ALOGD("app passed NULL surface"); - return c->setPreviewTexture(0); - } + ALOGD_IF(bufferProducer == 0, "app passed NULL surface"); + return c->setPreviewTexture(bufferProducer); } // start preview mode |