summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-26 02:23:06 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-26 11:24:17 +0000
commite657227f88844f31da7f9a11c783c84bdbbc80bd (patch)
treed71dac418820535412f9b4e1ad22aef23f53a43b /libs
parentc0f52aabe2ab8c859c4f3a790f6c8b0ec40107ba (diff)
downloadframeworks_native-e657227f88844f31da7f9a11c783c84bdbbc80bd.zip
frameworks_native-e657227f88844f31da7f9a11c783c84bdbbc80bd.tar.gz
frameworks_native-e657227f88844f31da7f9a11c783c84bdbbc80bd.tar.bz2
libgui: Add ICS/MR0-compatible client::createSurface constructors
Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 267359a..6ba933b 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -441,6 +441,30 @@ void SurfaceComposerClient::dispose() {
mStatus = NO_INIT;
}
+/* Create ICS/MR0-compatible constructors */
+extern "C" sp<SurfaceControl> _ZN7android21SurfaceComposerClient13createSurfaceERKNS_7String8Ejjij(
+ const String8& name,
+ uint32_t w,
+ uint32_t h,
+ PixelFormat format,
+ uint32_t flags);
+extern "C" sp<SurfaceControl> _ZN7android21SurfaceComposerClient13createSurfaceEijjij(
+ uint32_t display,
+ uint32_t w,
+ uint32_t h,
+ PixelFormat format,
+ uint32_t flags)
+{
+ String8 name;
+ const size_t SIZE = 128;
+ char buffer[SIZE];
+ snprintf(buffer, SIZE, "<pid_%d>", getpid());
+ name.append(buffer);
+
+ return _ZN7android21SurfaceComposerClient13createSurfaceERKNS_7String8Ejjij(name,
+ w, h, format, flags);
+}
+
sp<SurfaceControl> SurfaceComposerClient::createSurface(
const String8& name,
uint32_t w,