summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2012-12-18 09:46:54 -0800
committerAndy McFadden <fadden@android.com>2012-12-18 13:31:57 -0800
commit484566c410afdfbc4b6bc5aa1732aef37428a5b8 (patch)
tree5ce1fc6a755c32f0b6ff362fe1fc5bf0d9ee2b14 /camera
parent34d7db5dd43000cac7e8e156d79e9f97ccbb8990 (diff)
downloadframeworks_av-484566c410afdfbc4b6bc5aa1732aef37428a5b8.zip
frameworks_av-484566c410afdfbc4b6bc5aa1732aef37428a5b8.tar.gz
frameworks_av-484566c410afdfbc4b6bc5aa1732aef37428a5b8.tar.bz2
Rename ISurfaceTexture and SurfaceTexture
The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
Diffstat (limited to 'camera')
-rw-r--r--camera/Camera.cpp12
-rw-r--r--camera/ICamera.cpp11
2 files changed, 12 insertions, 11 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp
index d43cb0b..3aaacaf 100644
--- a/camera/Camera.cpp
+++ b/camera/Camera.cpp
@@ -27,7 +27,7 @@
#include <camera/ICameraRecordingProxyListener.h>
#include <camera/ICameraService.h>
-#include <gui/ISurfaceTexture.h>
+#include <gui/IGraphicBufferProducer.h>
#include <gui/Surface.h>
namespace android {
@@ -184,14 +184,14 @@ status_t Camera::setPreviewDisplay(const sp<Surface>& surface)
}
}
-// pass the buffered ISurfaceTexture to the camera service
-status_t Camera::setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture)
+// pass the buffered IGraphicBufferProducer to the camera service
+status_t Camera::setPreviewTexture(const sp<IGraphicBufferProducer>& bufferProducer)
{
- ALOGV("setPreviewTexture(%p)", surfaceTexture.get());
+ ALOGV("setPreviewTexture(%p)", bufferProducer.get());
sp <ICamera> c = mCamera;
if (c == 0) return NO_INIT;
- if (surfaceTexture != 0) {
- return c->setPreviewTexture(surfaceTexture);
+ if (bufferProducer != 0) {
+ return c->setPreviewTexture(bufferProducer);
} else {
ALOGD("app passed NULL surface");
return c->setPreviewTexture(0);
diff --git a/camera/ICamera.cpp b/camera/ICamera.cpp
index 8d8408c..5d210e7 100644
--- a/camera/ICamera.cpp
+++ b/camera/ICamera.cpp
@@ -22,7 +22,7 @@
#include <sys/types.h>
#include <binder/Parcel.h>
#include <camera/ICamera.h>
-#include <gui/ISurfaceTexture.h>
+#include <gui/IGraphicBufferProducer.h>
#include <gui/Surface.h>
namespace android {
@@ -79,13 +79,13 @@ public:
return reply.readInt32();
}
- // pass the buffered SurfaceTexture to the camera service
- status_t setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture)
+ // pass the buffered IGraphicBufferProducer to the camera service
+ status_t setPreviewTexture(const sp<IGraphicBufferProducer>& bufferProducer)
{
ALOGV("setPreviewTexture");
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
- sp<IBinder> b(surfaceTexture->asBinder());
+ sp<IBinder> b(bufferProducer->asBinder());
data.writeStrongBinder(b);
remote()->transact(SET_PREVIEW_TEXTURE, data, &reply);
return reply.readInt32();
@@ -292,7 +292,8 @@ status_t BnCamera::onTransact(
case SET_PREVIEW_TEXTURE: {
ALOGV("SET_PREVIEW_TEXTURE");
CHECK_INTERFACE(ICamera, data, reply);
- sp<ISurfaceTexture> st = interface_cast<ISurfaceTexture>(data.readStrongBinder());
+ sp<IGraphicBufferProducer> st =
+ interface_cast<IGraphicBufferProducer>(data.readStrongBinder());
reply->writeInt32(setPreviewTexture(st));
return NO_ERROR;
} break;