summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-03-12 18:42:23 -0700
committerMathias Agopian <mathias@google.com>2013-03-12 18:42:23 -0700
commit33da402287605e40e189289b11a08b8f5d515818 (patch)
tree440b60a701b5d4e4d93293732cf5a4a8bef3727c /camera
parentb05526fc3c0ccc9f9310830074e863212af433e0 (diff)
downloadframeworks_av-33da402287605e40e189289b11a08b8f5d515818.zip
frameworks_av-33da402287605e40e189289b11a08b8f5d515818.tar.gz
frameworks_av-33da402287605e40e189289b11a08b8f5d515818.tar.bz2
remove uses of Surface in favor or IGraphicBufferProducer
Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
Diffstat (limited to 'camera')
-rw-r--r--camera/Camera.cpp22
-rw-r--r--camera/ICamera.cpp19
2 files changed, 2 insertions, 39 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
diff --git a/camera/ICamera.cpp b/camera/ICamera.cpp
index 5d210e7..8900867 100644
--- a/camera/ICamera.cpp
+++ b/camera/ICamera.cpp
@@ -29,7 +29,6 @@ namespace android {
enum {
DISCONNECT = IBinder::FIRST_CALL_TRANSACTION,
- SET_PREVIEW_DISPLAY,
SET_PREVIEW_TEXTURE,
SET_PREVIEW_CALLBACK_FLAG,
START_PREVIEW,
@@ -68,17 +67,6 @@ public:
remote()->transact(DISCONNECT, data, &reply);
}
- // pass the buffered Surface to the camera service
- status_t setPreviewDisplay(const sp<Surface>& surface)
- {
- ALOGV("setPreviewDisplay");
- Parcel data, reply;
- data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
- Surface::writeToParcel(surface, &data);
- remote()->transact(SET_PREVIEW_DISPLAY, data, &reply);
- return reply.readInt32();
- }
-
// pass the buffered IGraphicBufferProducer to the camera service
status_t setPreviewTexture(const sp<IGraphicBufferProducer>& bufferProducer)
{
@@ -282,13 +270,6 @@ status_t BnCamera::onTransact(
disconnect();
return NO_ERROR;
} break;
- case SET_PREVIEW_DISPLAY: {
- ALOGV("SET_PREVIEW_DISPLAY");
- CHECK_INTERFACE(ICamera, data, reply);
- sp<Surface> surface = Surface::readFromParcel(data);
- reply->writeInt32(setPreviewDisplay(surface));
- return NO_ERROR;
- } break;
case SET_PREVIEW_TEXTURE: {
ALOGV("SET_PREVIEW_TEXTURE");
CHECK_INTERFACE(ICamera, data, reply);