summaryrefslogtreecommitdiff
path: root/libs/gui/ISurface.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2013-03-12 17:11:48 -0700
committer Mathias Agopian <mathias@google.com> 2013-03-12 17:11:48 -0700
commit4d9b822e2c18142e55fe2611aa6cd7dc7d4a62c6 (patch)
treeefde8891af25d54a8211ee4280733046f4417c25 /libs/gui/ISurface.cpp
parentf44e9f91f37d3fbed64bc952f241d5dc3c385b6a (diff)
get rid of ISurface
ISurface was only used to get the IGraphicBufferProducer from a Layer. It's now replaced by a BBinder subclass / IBinder and is only used as a handle to the surface, to both refer to it and manage its life-time. Also cleaned-up a bit the ISurfaceComposer interface and "create layer" code path. Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
Diffstat (limited to 'libs/gui/ISurface.cpp')
-rw-r--r--libs/gui/ISurface.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/libs/gui/ISurface.cpp b/libs/gui/ISurface.cpp
deleted file mode 100644
index 8c25f4513d..0000000000
--- a/libs/gui/ISurface.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "ISurface"
-
-#include <stdio.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <binder/Parcel.h>
-
-#include <gui/ISurface.h>
-#include <gui/IGraphicBufferProducer.h>
-
-namespace android {
-
-// ----------------------------------------------------------------------
-
-class BpSurface : public BpInterface<ISurface>
-{
-public:
- BpSurface(const sp<IBinder>& impl)
- : BpInterface<ISurface>(impl)
- {
- }
-
- virtual sp<IGraphicBufferProducer> getSurfaceTexture() const {
- Parcel data, reply;
- data.writeInterfaceToken(ISurface::getInterfaceDescriptor());
- remote()->transact(GET_SURFACE_TEXTURE, data, &reply);
- return interface_cast<IGraphicBufferProducer>(reply.readStrongBinder());
- }
-};
-
-IMPLEMENT_META_INTERFACE(Surface, "android.ui.ISurface");
-
-// ----------------------------------------------------------------------
-
-status_t BnSurface::onTransact(
- uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
- switch(code) {
- case GET_SURFACE_TEXTURE: {
- CHECK_INTERFACE(ISurface, data, reply);
- reply->writeStrongBinder( getSurfaceTexture()->asBinder() );
- return NO_ERROR;
- }
- default:
- return BBinder::onTransact(code, data, reply, flags);
- }
-}
-
-}; // namespace android