summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-06-18 18:06:45 -0700
committerMathias Agopian <mathias@google.com>2012-06-28 15:51:08 -0700
commit3094df359d1e6e2ae8ca4e935cc093f563804c96 (patch)
treee103ad608725652ec640963481151b59432c7475 /libs/gui/ISurfaceComposer.cpp
parent852db07d69352ec5f75e16a6e5059f05faabdaf5 (diff)
downloadframeworks_native-3094df359d1e6e2ae8ca4e935cc093f563804c96.zip
frameworks_native-3094df359d1e6e2ae8ca4e935cc093f563804c96.tar.gz
frameworks_native-3094df359d1e6e2ae8ca4e935cc093f563804c96.tar.bz2
First prototype atttempting to support an external display
both API and implementation will change, this is just a prototype intended to show feasability. SurfaceFlinger is passed an ISurfaceTexture through a new callback, it is in turn used to create an EGLSurface which surfaceflinger will draw into in addition to the main screen. Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 8177e4d..bc550bf 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -207,6 +207,13 @@ public:
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
remote()->transact(BnSurfaceComposer::UNBLANK, data, &reply);
}
+
+ virtual void connectDisplay(const sp<ISurfaceTexture> display) {
+ Parcel data, reply;
+ data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ data.writeStrongBinder(display->asBinder());
+ remote()->transact(BnSurfaceComposer::CONNECT_DISPLAY, data, &reply);
+ }
};
IMPLEMENT_META_INTERFACE(SurfaceComposer, "android.ui.ISurfaceComposer");
@@ -301,6 +308,12 @@ status_t BnSurfaceComposer::onTransact(
CHECK_INTERFACE(ISurfaceComposer, data, reply);
unblank();
} break;
+ case CONNECT_DISPLAY: {
+ CHECK_INTERFACE(ISurfaceComposer, data, reply);
+ sp<ISurfaceTexture> surfaceTexture =
+ interface_cast<ISurfaceTexture>(data.readStrongBinder());
+ connectDisplay(surfaceTexture);
+ } break;
default:
return BBinder::onTransact(code, data, reply, flags);
}